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

Fixes for timeouts in tests #5598

Merged
merged 5 commits into from
Oct 4, 2023
Merged
Changes from 1 commit
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
9 changes: 7 additions & 2 deletions python/cuml/internals/available_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@
cache = lru_cache(maxsize=None)


get_cuda_count = gpu_only_import_from("rmm._cuda.gpu", "getDeviceCount")
def get_cuda_count():
try:
import cupy
return True
except ImportError:
return False
dantegd marked this conversation as resolved.
Show resolved Hide resolved


@cache
def is_cuda_available():
try:
return GPU_ENABLED and get_cuda_count() >= 1
return GPU_ENABLED and get_cuda_count()
dantegd marked this conversation as resolved.
Show resolved Hide resolved
except UnavailableError:
return False
Loading