Skip to content

Commit

Permalink
Remove RAFT_BUILD_WHEELS and standardize Python builds (#2040)
Browse files Browse the repository at this point in the history
Some minor simplification in advance of the scikit-build-core migration to better align wheel and non-wheel Python builds.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Robert Maynard (https://github.com/robertmaynard)
  - Ray Douglass (https://github.com/raydouglass)

URL: #2040
  • Loading branch information
vyasr authored Dec 6, 2023
1 parent b333b74 commit 339878d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ci/build_wheel_pylibraft.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
set -euo pipefail

# Set up skbuild options. Enable sccache in skbuild config options
export SKBUILD_CONFIGURE_OPTIONS="-DRAFT_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF -DFIND_RAFT_CPP=OFF"
export SKBUILD_CONFIGURE_OPTIONS="-DDETECT_CONDA_ENV=OFF -DFIND_RAFT_CPP=OFF"

ci/build_wheel.sh pylibraft python/pylibraft
2 changes: 1 addition & 1 deletion ci/build_wheel_raft_dask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
set -euo pipefail

# Set up skbuild options. Enable sccache in skbuild config options
export SKBUILD_CONFIGURE_OPTIONS="-DRAFT_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF -DFIND_RAFT_CPP=OFF"
export SKBUILD_CONFIGURE_OPTIONS="-DDETECT_CONDA_ENV=OFF -DFIND_RAFT_CPP=OFF"

ci/build_wheel.sh raft-dask python/raft-dask
13 changes: 2 additions & 11 deletions python/pylibraft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ option(FIND_RAFT_CPP "Search for existing RAFT C++ installations before defaulti
ON
)

option(RAFT_BUILD_WHEELS "Whether this build is generating a Python wheel." OFF)

# If the user requested it we attempt to find RAFT.
if(FIND_RAFT_CPP)
find_package(raft ${pylibraft_version} REQUIRED COMPONENTS compiled)
Expand All @@ -60,16 +58,9 @@ if(NOT raft_FOUND)
set(BUILD_PRIMS_BENCH OFF)
set(BUILD_ANN_BENCH OFF)
set(RAFT_COMPILE_LIBRARY ON)
set(CUDA_STATIC_RUNTIME ON)

set(_exclude_from_all "")
if(RAFT_BUILD_WHEELS)
# Statically link dependencies if building wheels
set(CUDA_STATIC_RUNTIME ON)
# Don't install the raft C++ targets into wheels
set(_exclude_from_all EXCLUDE_FROM_ALL)
endif()

add_subdirectory(../../cpp raft-cpp ${_exclude_from_all})
add_subdirectory(../../cpp raft-cpp EXCLUDE_FROM_ALL)

# When building the C++ libraries from source we must copy libraft.so alongside the
# pairwise_distance and random Cython libraries TODO: when we have a single 'compiled' raft
Expand Down
13 changes: 2 additions & 11 deletions python/raft-dask/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ option(FIND_RAFT_CPP "Search for existing RAFT C++ installations before defaulti
OFF
)

option(RAFT_BUILD_WHEELS "Whether this build is generating a Python wheel." OFF)

# If the user requested it we attempt to find RAFT.
if(FIND_RAFT_CPP)
find_package(raft ${raft_dask_version} REQUIRED COMPONENTS distributed)
Expand All @@ -54,16 +52,9 @@ if(NOT raft_FOUND)
set(RAFT_COMPILE_LIBRARIES OFF)
set(RAFT_COMPILE_DIST_LIBRARY OFF)
set(RAFT_COMPILE_NN_LIBRARY OFF)
set(CUDA_STATIC_RUNTIME ON)

set(_exclude_from_all "")
if(RAFT_BUILD_WHEELS)
# Statically link dependencies if building wheels
set(CUDA_STATIC_RUNTIME ON)
# Don't install the raft C++ targets into wheels
set(_exclude_from_all EXCLUDE_FROM_ALL)
endif()

add_subdirectory(../../cpp raft-cpp ${_exclude_from_all})
add_subdirectory(../../cpp raft-cpp EXCLUDE_FROM_ALL)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}/cmake/find_modules)
find_package(NCCL REQUIRED)
endif()
Expand Down

0 comments on commit 339878d

Please sign in to comment.