Skip to content

Commit

Permalink
remove require_cuda defaults in internal functions (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored May 7, 2024
1 parent 0c7e6d1 commit bbe5b13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rapids_build_backend/impls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]
Expand Down

0 comments on commit bbe5b13

Please sign in to comment.