Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove RAFT_BUILD_WHEELS and standardize Python builds #2040

Merged
merged 1 commit into from
Dec 6, 2023
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
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