Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ else()
)
endif()

include(cmake/legateboost/get_rapids_cmake.cmake)
legateboost_get_rapids_cmake()

rapids_cuda_init_architectures(legateboost)
project(legateboost VERSION "${_legateboost_version}" LANGUAGES C CXX CUDA)

option(SANITIZE "Build with address sanitizer" OFF)
Expand Down Expand Up @@ -41,9 +45,6 @@ if (SANITIZE)
add_link_options(-fsanitize=address)
endif()

include(cmake/legateboost/get_rapids_cmake.cmake)
legateboost_get_rapids_cmake()

add_subdirectory(src)

include(cmake/legateboost/generate_install_info.cmake)
Expand Down
16 changes: 15 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ HELP="$0 [<target> ...] [<flag> ...]

--editable - install Python wheel in editable mode
--fix - clang-tidy will attempt to fix issues.
-v - Pass on verbosity to cmake and pip
-h | --help - print the help text
"

Expand All @@ -35,6 +36,7 @@ fi
PIP_INSTALL_ARGS=(
--no-build-isolation
--no-deps
--config-settings rapidsai.disable-cuda=true
)

# ensure 'native' is used if CUDAARCHS isn't set
Expand All @@ -46,6 +48,18 @@ if hasArg --editable; then
PIP_INSTALL_ARGS+=("--editable")
fi

if hasArg -v; then
CMAKE_VERBOSE_FLAG="-v"
PIP_INSTALL_ARGS+=(
"-v"
"--config-settings=build.verbose=true"
"--config-settings=logging.level=INFO"
)
set -x
else
CMAKE_VERBOSE_FLAG=""
fi

legate_root=$(
python -c 'import legate.install_info as i; from pathlib import Path; print(Path(i.libpath).parent.resolve())'
)
Expand All @@ -54,7 +68,7 @@ if hasArg liblegateboost || hasArg --editable; then
echo "Using Legate at '${legate_root}'"

cmake -S . -B build -Dlegate_ROOT="${legate_root}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES="${CMAKE_CUDA_ARCHITECTURES}"
cmake --build build -j
cmake --build build -j ${CMAKE_VERBOSE_FLAG}
echo "done building liblegateboost"
fi

Expand Down
3 changes: 1 addition & 2 deletions cmake/legateboost/get_rapids_cmake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ macro(legateboost_get_rapids_cmake)

if(NOT rapids-cmake-version)
# default
set(rapids-cmake-version 24.08)
set(rapids-cmake-sha "3cc764f287a6f3caeee5dd1c96c24b1710d4cdf1")
set(rapids-cmake-version 24.10)
endif()

if(NOT EXISTS ${CMAKE_BINARY_DIR}/RAPIDS.cmake)
Expand Down
6 changes: 3 additions & 3 deletions conda/environments/all_cuda-122.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ channels:
dependencies:
- clang-tools>=19.0
- clangxx>=19.0
- cmake>=3.24.0,!=3.30.0
- cmake>=3.26.4,!=3.30.0
- cuda-cudart-dev
- cuda-nvcc
- cuda-toolkit
Expand All @@ -30,10 +30,10 @@ dependencies:
- pytest>=7,<8
- python-build>=1.2.0
- python=3.12
- scikit-build>=0.18.0
- rapids-build-backend>=0.3.2,<0.4.0.dev0
- scikit-build-core>=0.10.0
- scikit-learn>=1.6
- seaborn>=0.13
- setuptools>=70.0
- sphinx>=8.1
- typing-extensions>=4.0
- xgboost>=2.0
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/legate-boost/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

# This assumes the script is executed from the root of the repo directory
./build.sh legate-boost
./build.sh legate-boost -v
4 changes: 2 additions & 2 deletions conda/recipes/legate-boost/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ requirements:
- openblas
- python
- pip
- scikit-build >=0.18.0
- setuptools >=70.0
- rapids-build-backend >=0.3.0,<0.4.0.dev0
- scikit-build-core >=0.10.0
# try to expose what's pulling in 'mkl'
- nomkl
run:
Expand Down
27 changes: 23 additions & 4 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,26 @@ files:
includes:
- build
- build_tools
- rapids_build_skbuild
- cuda_version
- docs
- py_version
- run
- test
- clang_tidy
py_build:
py_build_legateboost:
output: pyproject
pyproject_dir: .
extras:
table: build-system
includes:
- rapids_build_skbuild
py_rapids_build_legateboost:
output: pyproject
pyproject_dir: .
extras:
table: tool.rapids-build-backend
key: requires
includes:
- build
- build_tools
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want this to look a bit more like other RAPIDS libraries, then by convention these 2 lists would be spelled like this:

  py_build_legateboost:
    output: pyproject
    pyproject_dir: .
    extras:
      table: build-system
    includes:
      - rapids_build_skbuild
  py_rapids_build_legateboost:
    output: pyproject
    pyproject_dir: .
    extras:
      table: tool.rapids-build-backend
      key: requires
    includes:
      - build
      - build_tools

There are some docs on those conventions at https://github.com/rapidsai/build-planning/blob/d9e3c606d95c835ee384ac6480a4af0ac6cb024a/docs/docs/packaging.md#L85

Not critical, but following RAPIDS conventions does make it easier for more other RAPIDS folks to come in and help out on these repos.

Expand All @@ -26,6 +35,7 @@ files:
includes:
- build
- clang_tidy
- rapids_build_skbuild
py_docs:
output: none
includes:
Expand Down Expand Up @@ -68,11 +78,9 @@ dependencies:
- openblas
- output_types: [conda, pyproject, requirements]
packages:
- cmake>=3.24.0,!=3.30.0
- cmake>=3.26.4,!=3.30.0
- &legate legate==25.01.*,>=0.0.0.dev0
- ninja>=1.11.1.1
- scikit-build>=0.18.0
- setuptools>=70.0
clang_tidy:
common:
- output_types: [conda]
Expand All @@ -86,6 +94,17 @@ dependencies:
packages:
- cuda-nvcc
- python-build>=1.2.0
rapids_build_skbuild:
common:
- output_types: [conda, requirements, pyproject]
packages:
- rapids-build-backend>=0.3.2,<0.4.0.dev0
- output_types: conda
packages:
- scikit-build-core>=0.10.0
- output_types: [requirements, pyproject]
packages:
- scikit-build-core[pyproject]>=0.10.0
# NOTE: '>=' constraints are used here because some dependencies of
# cupynumeric have very tight cuda-version pins, e.g. libcusolver
cuda_version:
Expand Down
35 changes: 28 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
[build-system]
build-backend = "rapids_build_backend.build"
requires = [
"cmake>=3.24.0,!=3.30.0",
"rapids-build-backend>=0.3.2,<0.4.0.dev0",
"scikit-build-core[pyproject]>=0.10.0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`.

[tool.rapids-build-backend]
build-backend = "scikit_build_core.build"
dependencies-file = "dependencies.yaml"
commit-files = ["legateboost/GIT_COMMIT"]
matrix-entry = "cuda_suffixed=true"
requires = [
"cmake>=3.26.4,!=3.30.0",
"legate==25.01.*,>=0.0.0.dev0",
"ninja>=1.11.1.1",
"scikit-build>=0.18.0",
"setuptools>=70.0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`.
build-backend = "setuptools.build_meta"

[project]
name = "legate-boost"
Expand Down Expand Up @@ -52,12 +60,25 @@ Documentation = "https://rapidsai.github.io/legate-boost"
Repository = "https://github.com/rapidsai/legate-boost"
License = "https://github.com/rapidsai/legate-boost/blob/main/LICENSE"

[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "./VERSION"
regex = "(?P<value>.*)"

[tool.scikit-build]
build-dir = "build/{wheel_tag}"
cmake.build-type = "Release"
cmake.version = "CMakeLists.txt"
minimum-version = "build-system.requires"
ninja.make-fallback = true
sdist.exclude = ["*tests*"]
sdist.include = ["legateboost/install_info.py"]
sdist.reproducible = true
wheel.packages = ["legateboost"]

[tool.scikit-build.build]
verbose = true

[tool.setuptools.dynamic]
version = {file = "legateboost/VERSION"}

[tool.mypy]
strict = true
follow_imports = "skip"
Expand Down
47 changes: 0 additions & 47 deletions setup.py

This file was deleted.