-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Numba 0.58 implements `add_cu()` differently to Numba 0.57 and below. These changes bring the implementation in the patch in line with Numba 0.58 onwards, and makes the minimum supported Numba version 0.58, so that we don't have to support multiple different implementations. There is presently no widespread production use (or perhaps no production use at all) of pynvjitlink with Numba 0.57, so keeping Numba 0.57 compatibility is not considered. Testing of the patch against the current Numba version is added to the CI configuration. The version number is bumped to 0.1.12 to reflect the nature of this change. Fixes #39
- Loading branch information
Showing
9 changed files
with
84 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ jobs: | |
- test-conda | ||
- build-wheels | ||
- test-wheels | ||
- test-patch | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
checks: | ||
|
@@ -53,6 +54,16 @@ jobs: | |
build_type: pull-request | ||
test_script: "ci/test_conda.sh" | ||
matrix_filter: ${{ needs.compute-matrix.outputs.TEST_MATRIX }} | ||
test-patch: | ||
needs: | ||
- build-conda | ||
- compute-matrix | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
test_script: "ci/test_patch.sh" | ||
run_codecov: false | ||
matrix_filter: ${{ needs.compute-matrix.outputs.TEST_MATRIX }} | ||
build-wheels: | ||
needs: | ||
- compute-matrix | ||
|
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,12 @@ | ||
#!/usr/bin/env python | ||
# Copyright (c) 2024, NVIDIA CORPORATION | ||
|
||
from pynvjitlink import patch | ||
|
||
patch.patch_numba_linker() | ||
|
||
if __name__ == "__main__": | ||
from numba.testing._runtests import _main | ||
import sys | ||
|
||
sys.exit(0 if _main(sys.argv) else 1) |
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,41 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024, NVIDIA CORPORATION | ||
|
||
set -euo pipefail | ||
|
||
. /opt/conda/etc/profile.d/conda.sh | ||
|
||
rapids-logger "Generate testing dependencies" | ||
# TODO: Replace with rapids-dependency-file-generator | ||
rapids-mamba-retry create -n test \ | ||
cuda-nvcc-impl \ | ||
cuda-nvrtc \ | ||
cuda-version=${RAPIDS_CUDA_VERSION%.*} \ | ||
"numba>=0.58" \ | ||
python=${RAPIDS_PY_VERSION} | ||
|
||
# Temporarily allow unbound variables for conda activation. | ||
set +u | ||
conda activate test | ||
set -u | ||
|
||
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) | ||
|
||
rapids-print-env | ||
|
||
rapids-mamba-retry install \ | ||
--channel "${PYTHON_CHANNEL}" \ | ||
pynvjitlink | ||
|
||
rapids-logger "Check GPU usage" | ||
nvidia-smi | ||
|
||
EXITCODE=0 | ||
trap "EXITCODE=1" ERR | ||
set +e | ||
|
||
rapids-logger "Test Numba with patch" | ||
python ci/run_patched_numba_tests.py numba.cuda.tests -v -m | ||
|
||
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.1.11 | ||
0.1.12 |
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