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

Handle RuntimeError thrown by CUDA Python in validate_setup #10653

Merged
Merged
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
6 changes: 6 additions & 0 deletions python/cudf/cudf/utils/gpu_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ def validate_setup():
raise e
# If there is no GPU detected, set `gpus_count` to -1
gpus_count = -1
except RuntimeError as e:
shwina marked this conversation as resolved.
Show resolved Hide resolved
# getDeviceCount() can raise a RuntimeError
# when ``libcuda.so`` is missing.
# We don't want this to propagate up to the user.
warnings.warn(str(e))
shwina marked this conversation as resolved.
Show resolved Hide resolved
return

if gpus_count > 0:
# Cupy throws RunTimeException to get GPU count,
Expand Down