Skip to content

Commit 1b59b5c

Browse files
addressing old comments
1 parent f0ff9d5 commit 1b59b5c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

numba_cuda/numba/cuda/cudadrv/driver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3536,7 +3536,8 @@ def _stream_handle(stream):
35363536
"Expected a Stream object or 0, got %s" % type(stream).__name__
35373537
)
35383538
elif hasattr(stream, "__cuda_stream__"):
3539-
_, ptr = stream.__cuda_stream__()
3539+
ver, ptr = stream.__cuda_stream__()
3540+
assert ver == 0
35403541
if USE_NV_BINDING and isinstance(ptr, binding.CUstream):
35413542
return get_cuda_native_handle(ptr)
35423543
else:

numba_cuda/numba/cuda/tests/cudadrv/test_cuda_driver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def kernel(a):
213213
stream.sync()
214214

215215
kernel[1, 100, stream](ary)
216+
stream.sync()
216217

217218
result = ary.copy_to_host(stream=stream)
218219
for i, v in enumerate(result):

0 commit comments

Comments
 (0)