Skip to content

Commit

Permalink
Rename ENABLE_PYNVJITLINK for consistency
Browse files Browse the repository at this point in the history
- As a config variable, it is called `CUDA_ENABLE_PYNVJITLINK`
- As an environment variable, it is `NUMBA_CUDA_ENABLE_PYNVJITLINK`
  • Loading branch information
gmarkall committed Oct 22, 2024
1 parent 197c80b commit 126c386
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ci/test_conda_pynvjitlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ popd


rapids-logger "Run Tests"
ENABLE_PYNVJITLINK=1 NUMBA_CUDA_TEST_BIN_DIR=$NUMBA_CUDA_TEST_BIN_DIR python -m numba.runtests numba.cuda.tests -v
NUMBA_CUDA_ENABLE_PYNVJITLINK=1 NUMBA_CUDA_TEST_BIN_DIR=$NUMBA_CUDA_TEST_BIN_DIR python -m numba.runtests numba.cuda.tests -v

popd

Expand Down
2 changes: 1 addition & 1 deletion ci/test_wheel_pynvjitlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ rapids-logger "Show Numba system info"
python -m numba --sysinfo

rapids-logger "Run Tests"
ENABLE_PYNVJITLINK=1 NUMBA_CUDA_TEST_BIN_DIR=$NUMBA_CUDA_TEST_BIN_DIR python -m numba.runtests numba.cuda.tests -v
NUMBA_CUDA_ENABLE_PYNVJITLINK=1 NUMBA_CUDA_TEST_BIN_DIR=$NUMBA_CUDA_TEST_BIN_DIR python -m numba.runtests numba.cuda.tests -v

popd
16 changes: 8 additions & 8 deletions numba_cuda/numba/cuda/cudadrv/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ def _readenv(name, ctor, default):
)

ENABLE_PYNVJITLINK = (
_readenv("ENABLE_PYNVJITLINK", bool, False)
or getattr(config, "ENABLE_PYNVJITLINK", False)
_readenv("NUMBA_CUDA_ENABLE_PYNVJITLINK", bool, False)
or getattr(config, "CUDA_ENABLE_PYNVJITLINK", False)
)
if not hasattr(config, "ENABLE_PYNVJITLINK"):
config.ENABLE_PYNVJITLINK = ENABLE_PYNVJITLINK
if not hasattr(config, "CUDA_ENABLE_PYNVJITLINK"):
config.CUDA_ENABLE_PYNVJITLINK = ENABLE_PYNVJITLINK

if ENABLE_PYNVJITLINK:
try:
Expand All @@ -100,7 +100,7 @@ def _readenv(name, ctor, default):
if config.CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY:
raise ValueError(
"Can't set CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY and "
"ENABLE_PYNVJITLINK at the same time"
"CUDA_ENABLE_PYNVJITLINK at the same time"
)


Expand Down Expand Up @@ -2612,13 +2612,13 @@ def new(cls,
and driver_ver >= (12, 0)
):
raise ValueError(
"Use ENABLE_PYNVJITLINK for CUDA >= 12.0 MVC"
"Use CUDA_ENABLE_PYNVJITLINK for CUDA >= 12.0 MVC"
)
if config.ENABLE_PYNVJITLINK and driver_ver < (12, 0):
if config.CUDA_ENABLE_PYNVJITLINK and driver_ver < (12, 0):
raise ValueError(
"Enabling pynvjitlink requires CUDA 12."
)
if config.ENABLE_PYNVJITLINK:
if config.CUDA_ENABLE_PYNVJITLINK:
linker = PyNvJitLinker

elif config.CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY:
Expand Down
2 changes: 1 addition & 1 deletion numba_cuda/numba/cuda/tests/cudadrv/test_nvjitlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@


@unittest.skipIf(
not config.ENABLE_PYNVJITLINK or not TEST_BIN_DIR,
not config.CUDA_ENABLE_PYNVJITLINK or not TEST_BIN_DIR,
"pynvjitlink not enabled"
)
@skip_on_cudasim("Linking unsupported in the simulator")
Expand Down

0 comments on commit 126c386

Please sign in to comment.