From bbe5b13ea13bebd875dfed7d4514b34b768c3927 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 7 May 2024 15:16:26 -0500 Subject: [PATCH] remove require_cuda defaults in internal functions (#23) --- rapids_build_backend/impls.py | 4 ++-- tests/conftest.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rapids_build_backend/impls.py b/rapids_build_backend/impls.py index d4d8450..3dec619 100644 --- a/rapids_build_backend/impls.py +++ b/rapids_build_backend/impls.py @@ -39,7 +39,7 @@ def _get_backend(build_backend): @lru_cache -def _get_cuda_version(require_cuda=False): +def _get_cuda_version(require_cuda: bool): """Get the CUDA suffix based on nvcc. Parameters @@ -79,7 +79,7 @@ def _get_cuda_version(require_cuda=False): @lru_cache -def _get_cuda_suffix(require_cuda=False) -> str: +def _get_cuda_suffix(require_cuda: bool) -> str: """Get the CUDA suffix based on nvcc. Parameters diff --git a/tests/conftest.py b/tests/conftest.py index fd75549..eed717e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -69,7 +69,10 @@ def patch_nvcc_if_needed(nvcc_version): try: # Only create a patch if one is required. In addition to reducing overhead, this # also ensures that we test the real nvcc and don't mask any relevant errors. - if _get_cuda_version() is None or _get_cuda_version()[0] != nvcc_version: + if ( + _get_cuda_version(False) is None + or _get_cuda_version(False)[0] != nvcc_version + ): nvcc = _create_nvcc(nvcc_version) os.environ["PATH"] = os.pathsep.join( [os.path.dirname(nvcc), os.environ["PATH"]]