Skip to content

Commit 307e23a

Browse files
committed
Add nvmath-python tests
1 parent 7748ef6 commit 307e23a

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/workflows/pr.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- test-wheels
3333
- test-wheels-deps-wheels
3434
- test-thirdparty-cudf
35+
- test-thirdparty-nvmath
3536
- build-docs
3637
- coverage-report
3738
secrets: inherit
@@ -138,6 +139,17 @@ jobs:
138139
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
139140
# TODO: Enable for CUDA 13 when a supporting version of cuDF is available
140141
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | split(".") | .[0] | tonumber == 12))) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
142+
test-thirdparty-nvmath:
143+
needs:
144+
- build-wheels
145+
- compute-matrix
146+
uses: ./.github/workflows/wheels-test.yaml
147+
with:
148+
build_type: pull-request
149+
script: "ci/test_thirdparty_nvmath.sh"
150+
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
151+
# TODO: Enable for CUDA 13 when a supporting version of nvmath-python is available
152+
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | split(".") | .[0] | tonumber == 12))) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
141153
build-docs:
142154
uses: ./.github/workflows/docs-build.yaml
143155
coverage-report:

ci/test_thirdparty_nvmath.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: BSD-2-Clause
4+
5+
set -euo pipefail
6+
7+
CUDA_VER_MAJOR_MINOR=${CUDA_VER%.*}
8+
9+
NVMATH_PYTHON_VERSION="0.6.*"
10+
11+
rapids-logger "Install nvmath-python"
12+
13+
pip install nvmath-python[cu12,dx]==${NVMATH_PYTHON_VERSION}
14+
15+
rapids-logger "Remove Extraneous numba-cuda"
16+
pip uninstall -y numba-cuda
17+
18+
rapids-logger "Install wheel with test dependencies"
19+
package=$(realpath wheel/numba_cuda*.whl)
20+
echo "Package path: ${package}"
21+
python -m pip install \
22+
"${package}" \
23+
"cuda-python==${CUDA_VER_MAJOR_MINOR%.*}.*" \
24+
"cuda-core==0.3.*" \
25+
"nvidia-nvjitlink-cu12" \
26+
--group test
27+
28+
29+
rapids-logger "Shallow clone nvmath-python repository"
30+
git clone --single-branch --branch 'release-0.6.x' https://github.com/NVIDIA/nvmath-python.git
31+
32+
rapids-logger "Install nvmath-python test dependencies"
33+
34+
pip install nvmath-python/requirements/pip/tests.txt
35+
36+
pushd nvmath-python/tests
37+
38+
rapids-logger "Check GPU usage"
39+
nvidia-smi
40+
41+
rapids-logger "Show Numba system info"
42+
python -m numba --sysinfo
43+
44+
rapids-logger "Run nvmath-python device tests"
45+
# Required for nvmath-python to locate pip-install MathDx
46+
export MATHDX_HOME=${CONDA_PREFIX}/lib/python3.13/site-packages/nvidia/mathdx
47+
python -m pytest nvmath_tests/device
48+
49+
popd

0 commit comments

Comments
 (0)