-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3ca53c
commit 4ce95a7
Showing
6 changed files
with
129 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024, NVIDIA CORPORATION | ||
|
||
set -euo pipefail | ||
|
||
. /opt/conda/etc/profile.d/conda.sh | ||
|
||
if [ "${CUDA_VER%.*.*}" = "11" ]; then | ||
CTK_PACKAGES="cudatoolkit" | ||
else | ||
CTK_PACKAGES="cuda-nvcc-impl cuda-nvrtc" | ||
fi | ||
|
||
rapids-logger "Install testing dependencies" | ||
# TODO: Replace with rapids-dependency-file-generator | ||
rapids-mamba-retry create -n test \ | ||
c-compiler \ | ||
cxx-compiler \ | ||
${CTK_PACKAGES} \ | ||
cuda-python \ | ||
cuda-version=${CUDA_VER%.*} \ | ||
make \ | ||
psutil \ | ||
pytest \ | ||
python=${RAPIDS_PY_VERSION} | ||
|
||
# Temporarily allow unbound variables for conda activation. | ||
set +u | ||
conda activate test | ||
set -u | ||
|
||
rapids-mamba-retry install -c `pwd`/conda-repo numba-cuda | ||
|
||
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/ | ||
mkdir -p "${RAPIDS_TESTS_DIR}" | ||
pushd "${RAPIDS_TESTS_DIR}" | ||
|
||
rapids-print-env | ||
|
||
rapids-logger "Check GPU usage" | ||
nvidia-smi | ||
|
||
rapids-logger "Show Numba system info" | ||
python -m numba --sysinfo | ||
|
||
EXITCODE=0 | ||
trap "EXITCODE=1" ERR | ||
set +e | ||
|
||
|
||
rapids-logger "Install pynvjitlink" | ||
set +u | ||
conda install -c rapidsai pynvjitlink | ||
set -u | ||
|
||
rapids_logger "Build tests" | ||
|
||
PY_SCRIPT=" | ||
import numba_cuda | ||
root = numba_cuda.__file__.rstrip('__init__.py') | ||
test_dir = root + \"numba/cuda/tests/test_binary_generation/\" | ||
print(test_dir) | ||
" | ||
|
||
TEST_DIR=$(python -c "$PY_SCRIPT") | ||
pushd $TEST_DIR | ||
make | ||
popd | ||
|
||
|
||
rapids-logger "Run Tests" | ||
ENABLE_PYNVJITLINK=1 python -m numba.runtests numba.cuda.tests -v | ||
|
||
popd | ||
|
||
rapids-logger "Test script exiting with value: $EXITCODE" | ||
exit ${EXITCODE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023-2024, NVIDIA CORPORATION | ||
|
||
set -euo pipefail | ||
|
||
rapids-logger "Install testing dependencies" | ||
# TODO: Replace with rapids-dependency-file-generator | ||
python -m pip install \ | ||
psutil \ | ||
cuda-python \ | ||
pytest | ||
|
||
rapids-logger "Install pynvjitlink" | ||
python -m pip install pynvjitlink-cu12 | ||
|
||
rapids-logger "Build tests" | ||
PY_SCRIPT=" | ||
import numba_cuda | ||
root = numba_cuda.__file__.rstrip('__init__.py') | ||
test_dir = root + \"numba/cuda/tests/test_binary_generation/\" | ||
print(test_dir) | ||
" | ||
|
||
TEST_DIR=$(python -c "$PY_SCRIPT") | ||
pushd $TEST_DIR | ||
make | ||
popd | ||
|
||
rapids-logger "Install wheel" | ||
package=$(realpath wheel/numba_cuda*.whl) | ||
echo "Package path: $package" | ||
python -m pip install $package | ||
|
||
rapids-logger "Check GPU usage" | ||
nvidia-smi | ||
|
||
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/ | ||
mkdir -p "${RAPIDS_TESTS_DIR}" | ||
pushd "${RAPIDS_TESTS_DIR}" | ||
|
||
rapids-logger "Show Numba system info" | ||
python -m numba --sysinfo | ||
|
||
rapids-logger "Run Tests" | ||
ENABLE_PYNVJITLINK=1 python -m numba.runtests numba.cuda.tests -v | ||
|
||
popd |