Solve UnboundLocalError on copy_from_host_async
As discussed on
@@ -470,8 +470,8 @@ cdef class MemoryPointer:
The default uses CUDA stream of the current context.
"""
- if stream is None:
ptr = mem if isinstance(mem, int) else mem.value
+ if stream is None:
stream_ptr = stream_module.get_current_stream_ptr()
else:
stream_ptr = stream.ptr
