Skip to content

Commit

Permalink
clean up dependencies, other misc. fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Jan 10, 2025
1 parent c629a4b commit cce3e86
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: libcugraph
package-type: cpp
wheel-build-pylibcugraph:
needs: wheel-publish-libcugraph
secrets: inherit
Expand All @@ -107,6 +108,7 @@ jobs:
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: pylibcugraph
package-type: python
wheel-build-cugraph:
needs: wheel-publish-pylibcugraph
secrets: inherit
Expand All @@ -127,3 +129,4 @@ jobs:
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: cugraph
package-type: cpp
1 change: 0 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ jobs:
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
build_type: pull-request
script: ci/build_wheel_libcugraph.sh
node_type: cpu32
wheel-build-pylibcugraph:
needs: wheel-build-libcugraph
secrets: inherit
Expand Down
9 changes: 3 additions & 6 deletions ci/build_wheel_cugraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ package_dir="python/cugraph"

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

# Download the libcugraph and pylibcugraph wheels built in the previous steps and make them
# Download the libcugraph and pylibcugraph wheels built in the previous step and make them
# available for pip to find.
#
# ensure 'cugraph' wheel builds always use the 'libcugraph' and 'pylibcugraph' just built in the same CI run
#
# using env variable PIP_CONSTRAINT is necessary to ensure the constraints
# are used when creating the isolated build environment
LIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libcugraph_dist)
PYLIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python /tmp/pylibcugraph_dist)

Expand All @@ -25,6 +20,8 @@ libcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUGRAPH_WHEELHOUSE}/lib
pylibcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${PYLIBCUGRAPH_WHEELHOUSE}/pylibcugraph_*.whl)
EOF

# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints
# are used when creating the isolated build environment.
export PIP_CONSTRAINT="${PWD}/constraints.txt"

case "${RAPIDS_CUDA_VERSION}" in
Expand Down
1 change: 0 additions & 1 deletion ci/build_wheel_libcugraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export PIP_NO_BUILD_ISOLATION=0

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

# TODO(jameslamb): maybe we can remove this + the `cpu32` node type, now that we're not recompiling RAFT?
PARALLEL_LEVEL=$(python -c \
"from math import ceil; from multiprocessing import cpu_count; print(ceil(cpu_count()/4))")

Expand Down
9 changes: 3 additions & 6 deletions ci/build_wheel_pylibcugraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ package_dir="python/pylibcugraph"

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

# Download the libcugraph and wheel built in the previous step and make it
# Download the libcugraph wheel built in the previous step and make it
# available for pip to find.
#
# ensure 'cugraph' wheel builds always use the 'libcugraph' just built in the same CI run
#
# using env variable PIP_CONSTRAINT is necessary to ensure the constraints
# are used when creating the isolated build environment
LIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libcugraph_dist)

# TODO(jameslamb): remove this when https://github.com/rapidsai/raft/pull/2531 is merged
Expand All @@ -23,6 +18,8 @@ cat >> ./constraints.txt <<EOF
libcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUGRAPH_WHEELHOUSE}/libcugraph_*.whl)
EOF

# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints
# are used when creating the isolated build environment.
export PIP_CONSTRAINT="${PWD}/constraints.txt"

PARALLEL_LEVEL=$(python -c \
Expand Down
2 changes: 0 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ files:
- common_build
- depends_on_librmm
- depends_on_libraft
- python_build_cythonize
py_run_libcugraph:
output: pyproject
pyproject_dir: python/libcugraph
Expand All @@ -146,7 +145,6 @@ files:
includes:
- cuda_wheels
- depends_on_libraft
- depends_on_rmm
py_build_pylibcugraph:
output: pyproject
pyproject_dir: python/pylibcugraph
Expand Down
2 changes: 1 addition & 1 deletion python/libcugraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ project(
option(USE_CUDA_MATH_WHEELS "Use the CUDA math wheels instead of the system libraries" OFF)

# Check if cugraph is already available. If so, it is the user's responsibility to ensure that the
# CMake package is also available at build time of the Python cugraph package.
# CMake package is also available at build time of Python packages that need libcugraph.
find_package(cugraph "${RAPIDS_VERSION}")

if(cugraph_FOUND)
Expand Down
4 changes: 2 additions & 2 deletions python/libcugraph/libcugraph/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# namespace. This allows libraries that express a dependency on
# this library to be loaded later and successfully satisfy this dependency
# without polluting the global symbol table with symbols from
# libcudf that could conflict with symbols from other DSOs.
# libcugraph that could conflict with symbols from other DSOs.
PREFERRED_LOAD_FLAG = ctypes.RTLD_LOCAL


Expand All @@ -45,7 +45,7 @@ def _load_wheel_installation(soname: str):
def load_library():
"""Dynamically load libcugraph.so and its dependencies"""
try:
# libraft must be loaded before libcugraphl because libcugraph
# libraft must be loaded before libcugraph because libcugraph
# references its symbols
import libraft

Expand Down
2 changes: 0 additions & 2 deletions python/libcugraph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ dependencies = [
"nvidia-curand",
"nvidia-cusolver",
"nvidia-cusparse",
"rmm==25.2.*,>=0.0.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[project.urls]
Expand Down Expand Up @@ -82,7 +81,6 @@ dependencies-file = "../../dependencies.yaml"
matrix-entry = "cuda_suffixed=true;use_cuda_wheels=true"
requires = [
"cmake>=3.26.4,!=3.30.0",
"cython>=3.0.0",
"libraft==25.2.*,>=0.0.0a0",
"librmm==25.2.*,>=0.0.0a0",
"ninja",
Expand Down

0 comments on commit cce3e86

Please sign in to comment.