|
| 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