-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
Type of Bug
Runtime Error
Component
cuda.core
Describe the bug
Starting with cuda.core 0.6, accessing Stream.handle when the Python is shutting down, fails with
ModuleNotFoundError: import of builtins halted; None in sys.modules
It used to work just fine before (0.5.1). Looks like as_py(..) is the culprit.
How to Reproduce
from cuda.core import Device
class MyClass:
def __init__(self, stream):
self.stream = stream
def __del__(self):
print("MyClass del", self.stream.handle)
dev = Device(0)
dev.set_current()
cp_stream = dev.create_stream()
my_stream = MyClass(cp_stream)
Expected behavior
Accessing the handle doesn't try to import modules and is safe to call from finalizers that may run on shutdown.
Operating System
No response
nvidia-smi output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working