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 NVMLError_Unknown in NVML diagnostics #5121

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

pentschev
Copy link
Member

Resolves another error reported in #4965, where Distributed is running on nvidia-docker without GPUs installed.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @pentschev! Does pynvml have a base exception we can catch here? I'm wondering if it makes sense for us to say "try to do pynvml.nvmlInit(), but if pynvml throws any error, then bail"

cc @quasiben

@pentschev
Copy link
Member Author

pentschev commented Jul 27, 2021

Thanks for fixing this @pentschev! Does pynvml have a base exception we can catch here? I'm wondering if it makes sense for us to say "try to do pynvml.nvmlInit(), but if pynvml throws any error, then bail"

I generally dislike this idea. It can be very convenient now, but if there's an actual bug in NVML (or CUDA, or something wrong with a GPU, etc.) that's not related to some unexpected ways used (e.g., using nvidia-docker without a GPU), then it becomes very difficult to find where that exception was ignored.

@jrbourbeau
Copy link
Member

Fair point. I was mostly concerned about the number of times we've updated this portion of the codebase recently. Though most users are probably fine today since, as you mentioned, the update here is to account for a usage edge case

@jrbourbeau jrbourbeau merged commit 465f14a into dask:main Jul 28, 2021
@pentschev pentschev deleted the fix-nvml-error-unknown branch August 6, 2021 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants