Is this a duplicate?
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
Is this a duplicate?
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
It used to work just fine before (0.5.1). Looks like
as_py(..)is the culprit.How to Reproduce
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