-
Notifications
You must be signed in to change notification settings - Fork 157
[BUG]: compute-sanitzer finds CUDA_ERROR_INVALID_CONTEXT with default Device constructor #562
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
Comments
I think this bug may have been fixed on |
I actually don't understand what happens and need to look into it. |
Yes. I definitely should have included the log output from this error. Here:
|
We need to figure out what changes were made to the main branch that fixed this error and backport them to the |
This is the minimal reproducer based on the traceback that Daniel provided above: $ compute-sanitizer python -c "import cuda.bindings.runtime as runtime; runtime.cudaGetDevice()" This happens because in the public releases |
Is this a duplicate?
Type of Bug
Silent Failure
Component
cuda.core v0.2.0 cuda-bindings v12.8.0
Describe the bug
Trying to initialize a
Device
with the current context when there is no current context causes an CUDA_ERROR_INVALID_CONTEXT.How to Reproduce
Run the following script with compute-sanitizer:
Expected behavior
Device(None)
should choose a default device (perhapsSystem.devices[0]
?) to create a context if there is no existing current context.Otherwise, if you are writing library code and you want to get the current device context but there is no guarantee that the user has already created one, then how do you get it without raising an error?
The error should be caught and invisible to compute-sanitizer.
Operating System
WSL2
nvidia-smi output
The text was updated successfully, but these errors were encountered: