Skip to content

Commit

Permalink
Merge branch 'branch-25.02' of https://github.com/rapidsai/cugraph in…
Browse files Browse the repository at this point in the history
…to bug_build_sample_post_processing
  • Loading branch information
seunghwak committed Jan 13, 2025
2 parents 8b64bae + dd228f9 commit b6d9ea0
Show file tree
Hide file tree
Showing 30 changed files with 346 additions and 233 deletions.
10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ test-results
## Python build directories & artifacts
dask-worker-space/
htmlcov
*.conda
dist/
*.egg-info/
python/build
Expand All @@ -40,9 +41,7 @@ wheels/
wheelhouse/
_skbuild/
cufile.log

## pylibcugraph build directories & artifacts
python/pylibcugraph/pylibcugraph.egg-info
*.whl

## Patching
*.diff
Expand Down Expand Up @@ -89,10 +88,7 @@ docs/cugraph/lib*
docs/cugraph/api/*

# created by Dask tests
python/dask-worker-space
python/cugraph/dask-worker-space
python/cugraph/cugraph/dask-worker-space
python/cugraph/cugraph/tests/dask-worker-space
dask-worker-space/

# Sphinx docs & build artifacts
docs/cugraph/source/api_docs/api/*
Expand Down
6 changes: 1 addition & 5 deletions benchmarks/cugraph/pytest-based/bench_algos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
# Copyright (c) 2020-2025, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -42,7 +42,6 @@ def setFixtureParamNames(*args, **kwargs):
from cugraph.structure.number_map import NumberMap
from cugraph.generators import rmat
from cugraph.testing import utils, mg_utils
from cugraph.utilities.utils import is_device_version_less_than

from cugraph_benchmarking.params import (
directed_datasets,
Expand Down Expand Up @@ -362,9 +361,6 @@ def bench_sorensen(gpubenchmark, unweighted_graph):
gpubenchmark(sorensen, G, vert_pairs)


@pytest.mark.skipif(
is_device_version_less_than((7, 0)), reason="Not supported on Pascal"
)
def bench_louvain(gpubenchmark, graph):
louvain = dask_cugraph.louvain if is_graph_distributed(graph) else cugraph.louvain
gpubenchmark(louvain, graph)
Expand Down
39 changes: 12 additions & 27 deletions ci/notebook_list.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# Copyright (c) 2021-2025, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -17,7 +17,7 @@
import glob
from pathlib import Path

from numba import cuda
from cuda.bindings import runtime

# for adding another run type and skip file name add to this dictionary
runtype_dict = {
Expand All @@ -30,20 +30,18 @@

def skip_book_dir(runtype):
# Add all run types here, currently only CI supported
return runtype in runtype_dict and Path(runtype_dict.get(runtype)).is_file()

if runtype in runtype_dict.keys():
if Path(runtype_dict.get(runtype)).is_file():
return True
return False

def _get_cuda_version_string():
status, version = runtime.getLocalRuntimeVersion()
if status != runtime.cudaError_t.cudaSuccess:
raise RuntimeError("Could not get CUDA runtime version.")
major, minor = divmod(version, 1000)
minor //= 10
return f"{major}.{minor}"

cuda_version_string = ".".join([str(n) for n in cuda.runtime.get_version()])
#
# Not strictly true... however what we mean is
# Pascal or earlier
#
ampere = False
device = cuda.get_current_device()
cuda_version_string = _get_cuda_version_string()

parser = argparse.ArgumentParser(description="Condition for running the notebook tests")
parser.add_argument("runtype", type=str)
Expand All @@ -52,19 +50,10 @@ def skip_book_dir(runtype):

runtype = args.runtype

if runtype not in runtype_dict.keys():
if runtype not in runtype_dict:
print(f"Unknown Run Type = {runtype}", file=sys.stderr)
exit()


# check for the attribute using both pre and post numba 0.53 names
cc = getattr(device, "COMPUTE_CAPABILITY", None) or getattr(
device, "compute_capability"
)
if cc[0] >= 8:
ampere = True

skip = False
for filename in glob.iglob("**/*.ipynb", recursive=True):
skip = False
if skip_book_dir(runtype):
Expand All @@ -88,10 +77,6 @@ def skip_book_dir(runtype):
)
skip = True
break
elif ampere and re.search("# Does not run on Ampere", line):
print(f"SKIPPING {filename} (does not run on Ampere)", file=sys.stderr)
skip = True
break
elif re.search("# Does not run on CUDA ", line) and (
cuda_version_string in line
):
Expand Down
11 changes: 1 addition & 10 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
#!/bin/bash
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

set -eoxu pipefail

package_name=$1

python_package_name=$(echo ${package_name}|sed 's/-/_/g')

mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist

# use 'ls' to expand wildcard before adding `[extra]` requires for pip
# pip creates wheels using python package names
python -m pip install $(ls ./dist/${python_package_name}*.whl)[test]

# Run smoke tests for aarch64 pull requests
arch=$(uname -m)
if [[ "${arch}" == "aarch64" && ${RAPIDS_BUILD_TYPE} == "pull-request" ]]; then
Expand Down
14 changes: 10 additions & 4 deletions ci/test_wheel_cugraph.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/bin/bash
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

set -eoxu pipefail

# Download the pylibcugraph built in the previous step
# Download the packages built in the previous step
mkdir -p ./dist
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-dep
python -m pip install --no-deps ./local-pylibcugraph-dep/pylibcugraph*.whl
RAPIDS_PY_WHEEL_NAME="cugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist
RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./local-pylibcugraph-dep

# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install \
"$(echo ./dist/cugraph*.whl)[test]" \
./local-pylibcugraph-dep/pylibcugraph*.whl

./ci/test_wheel.sh cugraph
11 changes: 10 additions & 1 deletion ci/test_wheel_pylibcugraph.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

set -eoxu pipefail

# Download the packages built in the previous step
mkdir -p ./dist
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 python ./dist

# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install \
"$(echo ./dist/pylibcugraph*.whl)[test]"

./ci/test_wheel.sh pylibcugraph
4 changes: 3 additions & 1 deletion conda/recipes/pylibcugraph/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') + environ.get('VERSION_SUFFIX', '') %}
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
Expand Down Expand Up @@ -74,7 +74,9 @@ requirements:
{% else %}
- cuda-cudart
{% endif %}
- cupy >=12.0.0
- libcugraph ={{ version }}
- numpy>=1.23,<3.0a0
- pylibraft ={{ minor_version }}
- python
- rmm ={{ minor_version }}
Expand Down
6 changes: 3 additions & 3 deletions cpp/cmake/thirdparty/get_raft.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,7 +39,7 @@ function(find_and_configure_raft)
endif()

rapids_cpm_find(raft ${PKG_VERSION}
GLOBAL_TARGETS raft::raft
GLOBAL_TARGETS raft::raft raft::raft_logger raft::raft_logger_impl
BUILD_EXPORT_SET cugraph-exports
INSTALL_EXPORT_SET cugraph-exports
COMPONENTS ${RAFT_COMPONENTS}
Expand All @@ -51,7 +51,7 @@ function(find_and_configure_raft)
OPTIONS
"RAFT_COMPILE_LIBRARY ${PKG_COMPILE_RAFT_LIB}"
"BUILD_TESTS OFF"
"BUILD_BENCH OFF"
"BUILD_PRIMS_BENCH OFF"
"BUILD_CAGRA_HNSWLIB OFF"
)

Expand Down
Loading

0 comments on commit b6d9ea0

Please sign in to comment.