Skip to content

Commit

Permalink
Remove CUGRAPH_BUILD_WHEELS and standardize Python builds
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Dec 4, 2023
1 parent 20145b4 commit ce2aff6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 36 deletions.
2 changes: 1 addition & 1 deletion ci/build_wheel_cugraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME=pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX} rapids-download-wheels-from-s3 ./local-pylibcugraph
export PIP_FIND_LINKS=$(pwd)/local-pylibcugraph

export SKBUILD_CONFIGURE_OPTIONS="-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=${GITHUB_WORKSPACE}/cugraph-ops/"
export SKBUILD_CONFIGURE_OPTIONS="-DDETECT_CONDA_ENV=OFF -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=${GITHUB_WORKSPACE}/cugraph-ops/"

./ci/build_wheel.sh cugraph python/cugraph
2 changes: 1 addition & 1 deletion ci/build_wheel_pylibcugraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

set -euo pipefail

export SKBUILD_CONFIGURE_OPTIONS="-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=${GITHUB_WORKSPACE}/cugraph-ops/"
export SKBUILD_CONFIGURE_OPTIONS="-DDETECT_CONDA_ENV=OFF -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=${GITHUB_WORKSPACE}/cugraph-ops/"

./ci/build_wheel.sh pylibcugraph python/pylibcugraph
25 changes: 8 additions & 17 deletions python/cugraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ project(
option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before defaulting to local files"
OFF
)
option(CUGRAPH_BUILD_WHEELS "Whether this build is generating a Python wheel." OFF)
option(USE_CUGRAPH_OPS "Enable all functions that call cugraph-ops" ON)

if(NOT USE_CUGRAPH_OPS)
Expand All @@ -59,22 +58,14 @@ if(NOT cugraph_FOUND)
set(BUILD_TESTS OFF)
set(BUILD_CUGRAPH_MG_TESTS OFF)
set(BUILD_CUGRAPH_OPS_CPP_TESTS OFF)

set(_exclude_from_all "")
if(CUGRAPH_BUILD_WHEELS)
# Statically link dependencies if building wheels
set(CUDA_STATIC_RUNTIME ON)
set(USE_RAFT_STATIC ON)
set(CUGRAPH_COMPILE_RAFT_LIB ON)
set(CUGRAPH_USE_CUGRAPH_OPS_STATIC ON)
set(CUGRAPH_EXCLUDE_CUGRAPH_OPS_FROM_ALL ON)
set(ALLOW_CLONE_CUGRAPH_OPS ON)

# Don't install the cuML C++ targets into wheels
set(_exclude_from_all EXCLUDE_FROM_ALL)
endif()

add_subdirectory(../../cpp cugraph-cpp ${_exclude_from_all})
set(CUDA_STATIC_RUNTIME ON)
set(USE_RAFT_STATIC ON)
set(CUGRAPH_COMPILE_RAFT_LIB ON)
set(CUGRAPH_USE_CUGRAPH_OPS_STATIC ON)
set(CUGRAPH_EXCLUDE_CUGRAPH_OPS_FROM_ALL ON)
set(ALLOW_CLONE_CUGRAPH_OPS ON)

add_subdirectory(../../cpp cugraph-cpp EXCLUDE_FROM_ALL)

set(cython_lib_dir cugraph)
install(TARGETS cugraph DESTINATION ${cython_lib_dir})
Expand Down
25 changes: 8 additions & 17 deletions python/pylibcugraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ project(
option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before defaulting to local files"
OFF
)
option(CUGRAPH_BUILD_WHEELS "Whether we're building a wheel for pypi" OFF)
option(USE_CUGRAPH_OPS "Enable all functions that call cugraph-ops" ON)

if(NOT USE_CUGRAPH_OPS)
Expand All @@ -59,22 +58,14 @@ if (NOT cugraph_FOUND)
set(BUILD_TESTS OFF)
set(BUILD_CUGRAPH_MG_TESTS OFF)
set(BUILD_CUGRAPH_OPS_CPP_TESTS OFF)

set(_exclude_from_all "")
if(CUGRAPH_BUILD_WHEELS)
# Statically link dependencies if building wheels
set(CUDA_STATIC_RUNTIME ON)
set(USE_RAFT_STATIC ON)
set(CUGRAPH_COMPILE_RAFT_LIB ON)
set(CUGRAPH_USE_CUGRAPH_OPS_STATIC ON)
set(CUGRAPH_EXCLUDE_CUGRAPH_OPS_FROM_ALL ON)
set(ALLOW_CLONE_CUGRAPH_OPS ON)

# Don't install the cuML C++ targets into wheels
set(_exclude_from_all EXCLUDE_FROM_ALL)
endif()

add_subdirectory(../../cpp cugraph-cpp ${_exclude_from_all})
set(CUDA_STATIC_RUNTIME ON)
set(USE_RAFT_STATIC ON)
set(CUGRAPH_COMPILE_RAFT_LIB ON)
set(CUGRAPH_USE_CUGRAPH_OPS_STATIC ON)
set(CUGRAPH_EXCLUDE_CUGRAPH_OPS_FROM_ALL ON)
set(ALLOW_CLONE_CUGRAPH_OPS ON)

add_subdirectory(../../cpp cugraph-cpp EXCLUDE_FROM_ALL)

set(cython_lib_dir pylibcugraph)
install(TARGETS cugraph DESTINATION ${cython_lib_dir})
Expand Down

0 comments on commit ce2aff6

Please sign in to comment.