Skip to content

Commit 872bfac

Browse files
authored
test: isolate library wheel smoke test, add missing 'cuda-pathfinder' dependency for 'libcuvs' (#2524)
Adds a CI check installing the `libcuvs` wheel in a clean virtual environment and calling its `load_library()` entry point before installing the high-level wheel or test extras. This exposes missing library-wheel runtime dependencies that the full test environment can otherwise mask. Through this testing, found that `libcuvs` was missing a dependency on `cuda-pathfinder` for this: https://github.com/NVIDIA/cuvs/blob/9c9d359aa51e4d279a27a94b0d1f14cacc2e34ee/python/libcuvs/libcuvs/load.py#L42 xref: rapidsai/build-planning#307 Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Bradley Dice (https://github.com/bdice) URL: #2524
1 parent d258090 commit 872bfac

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎ci/test_wheel_cuvs.sh‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION.
2+
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44

55
set -euo pipefail
@@ -15,6 +15,17 @@ CUVS_WHEELHOUSE=$(rapids-download-from-github "$(rapids-artifact-name wheel_pyth
1515
# generate constraints (possibly pinning to oldest support versions of dependencies)
1616
rapids-generate-pip-constraints test_python "${PIP_CONSTRAINT}"
1717

18+
python -m venv libcuvs-env
19+
. libcuvs-env/bin/activate
20+
21+
rapids-pip-retry install \
22+
-v \
23+
--prefer-binary \
24+
--constraint "${PIP_CONSTRAINT}" \
25+
"${LIBCUVS_WHEELHOUSE}"/libcuvs*.whl
26+
python -c "import libcuvs; assert (libraries := libcuvs.load_library()) and all(libraries)"
27+
deactivate
28+
1829
# notes:
1930
#
2031
# * echo to expand wildcard before adding `[test]` requires for pip

‎dependencies.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ files:
152152
- depends_on_libraft
153153
- depends_on_librmm
154154
- depends_on_nccl
155+
- run_py_libcuvs
155156
py_build_cuvs:
156157
output: pyproject
157158
pyproject_dir: python/cuvs
@@ -560,6 +561,11 @@ dependencies:
560561
- output_types: [conda, requirements, pyproject]
561562
packages:
562563
- &numpy numpy>=2.0,<3.0
564+
run_py_libcuvs:
565+
common:
566+
- output_types: [requirements, pyproject]
567+
packages:
568+
- cuda-pathfinder
563569
test_python_common:
564570
common:
565571
- output_types: [conda, requirements, pyproject]

‎python/libcuvs/pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ authors = [
1919
license = "Apache-2.0"
2020
requires-python = ">=3.11"
2121
dependencies = [
22+
"cuda-pathfinder",
2223
"cuda-toolkit[cublas,curand,cusolver,cusparse,nvrtc]==13.*",
2324
"libraft==26.10.*,>=0.0.0a0",
2425
"librmm==26.10.*,>=0.0.0a0",

0 commit comments

Comments
 (0)