Skip to content

Commit

Permalink
Merge pull request #151 from rapidsai/branch-24.04
Browse files Browse the repository at this point in the history
Forward-merge branch-24.04 to branch-24.06
  • Loading branch information
GPUtester authored Mar 20, 2024
2 parents a5e3005 + ca3844e commit e46b1ef
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 96 deletions.
19 changes: 6 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright (c) 2019-2023, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.

# wholegraph build script

Expand Down Expand Up @@ -49,7 +49,7 @@ HELP="$0 [<target> ...] [<flag> ...]
and <flag> is:
-v - verbose build mode
-g - build for debug
-n - no install step
-n - no install step (does not affect Python)
--allgpuarch - build for all supported GPU architectures
--cmake-args=\\\"<args>\\\" - add arbitrary CMake arguments to any cmake call
--compile-cmd - only output compile commands (invoke CMake without build)
Expand Down Expand Up @@ -271,19 +271,12 @@ if buildAll || hasArg pylibwholegraph; then
if ! hasArg --compile-cmd; then
cd ${REPODIR}/python/pylibwholegraph
env LIBWHOLEGRAPH_DIR=${LIBWHOLEGRAPH_DIR} \
${PYTHON} setup.py build_ext --inplace \
--build-type=${BUILD_TYPE} \
${EXTRA_CMAKE_ARGS}
if ! hasArg -n; then
env LIBWHOLEGRAPH_DIR=${LIBWHOLEGRAPH_DIR} \
${PYTHON} setup.py install \
--build-type=${BUILD_TYPE} \
${EXTRA_CMAKE_ARGS}
fi
SKBUILD_CMAKE_ARGS="-DCMAKE_BUILD_TYPE=${BUILD_TYPE};${EXTRA_CMAKE_ARGS/ /;}" ${PYTHON} -m pip install --no-build-isolation --no-deps .

else
# just invoke cmake without going through scikit-build
# just invoke cmake without going through scikit-build-core
env LIBWHOLEGRAPH_DIR=${LIBWHOLEGRAPH_DIR} \
cmake -S ${REPODIR}/python/pylibwholegraph -B ${REPODIR}/python/pylibwholegraph/_skbuild/build \
cmake -S ${REPODIR}/python/pylibwholegraph -B ${REPODIR}/python/pylibwholegraph/build \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
${EXTRA_CMAKE_ARGS}
fi
Expand Down
4 changes: 2 additions & 2 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.
# Copyright (c) 2023-2024, NVIDIA CORPORATION.

set -euo pipefail

Expand Down Expand Up @@ -38,7 +38,7 @@ fi
cd "${package_dir}"

# Hardcode the output dir
SKBUILD_CONFIGURE_OPTIONS="-DDETECT_CONDA_ENV=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -DCUDA_STATIC_RUNTIME=ON -DWHOLEGRAPH_BUILD_WHEELS=ON" \
SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DBUILD_SHARED_LIBS=OFF;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-DCUDA_STATIC_RUNTIME=ON;-DWHOLEGRAPH_BUILD_WHEELS=ON" \
python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check

mkdir -p final_dist
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies:
- pytorch-cuda=11.8
- pytorch=2.0.0
- recommonmark
- scikit-build
- scikit-build-core>=0.7.0
- sphinx-copybutton
- sphinx-markdown-tables
- sphinx<6
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-122_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies:
- pytest-xdist
- python>=3.9,<3.12
- recommonmark
- scikit-build
- scikit-build-core>=0.7.0
- sphinx-copybutton
- sphinx-markdown-tables
- sphinx<6
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/pylibwholegraph/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cuda11_compiler:
cmake_version:
- ">=3.26.4"

scikit_build_version:
- ">=0.13.1"
scikit_build_core_version:
- ">=0.7.0"

sysroot_version:
- "2.17"
4 changes: 2 additions & 2 deletions conda/recipes/pylibwholegraph/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') + environ.get('VERSION_SUFFIX', '') %}
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
Expand Down Expand Up @@ -63,7 +63,7 @@ requirements:
- cython
- libwholegraph ={{ version }}
- python
- scikit-build {{ scikit_build_version }}
- scikit-build-core {{ scikit_build_core_version }}
run:
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
{% if cuda_major == "11" %}
Expand Down
6 changes: 2 additions & 4 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dependencies:
- librmm==24.6.*
- nanobind>=0.2.0
- nccl
- scikit-build
- scikit-build-core>=0.7.0
specific:
- output_types: conda
matrices:
Expand Down Expand Up @@ -322,6 +322,4 @@ dependencies:
- cmake>=3.26.4
- cython>=3.0.0
- ninja
- setuptools
- scikit-build>=0.13.1
- wheel
- scikit-build-core[pyproject]>=0.7.0
4 changes: 2 additions & 2 deletions python/pylibwholegraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include(rapids-cpm)

rapids_cuda_init_architectures(PYLIBWHOLEGRAPH)

project(PYLIBWHOLEGRAPH VERSION ${WHOLEGRAPH_VERSION} LANGUAGES C CXX CUDA)
project(PYLIBWHOLEGRAPH VERSION ${WHOLEGRAPH_VERSION} LANGUAGES CXX CUDA)

##############################################################################
# - User Options ------------------------------------------------------------
Expand Down Expand Up @@ -132,7 +132,7 @@ execute_process(
)
list(APPEND CMAKE_MODULE_PATH "${SKBUILD_CMAKE_MODULE_PATH}")

include(rapids-cython)
include(rapids-cython-core)
rapids_cython_init()

##############################################################################
Expand Down
21 changes: 14 additions & 7 deletions python/pylibwholegraph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
# limitations under the License.

[build-system]
build-backend = "scikit_build_core.build"
requires = [
"cmake>=3.26.4",
"cython>=3.0.0",
"ninja",
"scikit-build>=0.13.1",
"setuptools",
"wheel",
"scikit-build-core[pyproject]>=0.7.0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[project]
Expand All @@ -43,8 +42,16 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]

[tool.setuptools]
license-files = ["LICENSE"]
[tool.scikit-build]
build-dir = "build/{wheel_tag}"
cmake.build-type = "Release"
cmake.minimum-version = "3.26.4"
ninja.make-fallback = true
sdist.exclude = ["*tests*"]
sdist.reproducible = true
wheel.packages = ["pylibwholegraph"]

[tool.setuptools.dynamic]
version = {file = "pylibwholegraph/VERSION"}
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "pylibwholegraph/VERSION"
regex = "(?P<value>.*)"
62 changes: 0 additions & 62 deletions python/pylibwholegraph/setup.py

This file was deleted.

0 comments on commit e46b1ef

Please sign in to comment.