Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove require_cuda defaults in internal functions #23

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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