Skip to content

Commit 9dea137

Browse files
committed
Non-argument streams are now correctly passed in the CuPy and NVCUDA backends
1 parent 7bd7c2b commit 9dea137

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

kernel_tuner/backends/cupy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ def run_kernel(self, func, gpu_args, threads, grid, stream=None):
198198
of the grid
199199
:type grid: tuple(int, int)
200200
"""
201+
if stream is None:
202+
stream = self.stream
201203
func(grid, threads, gpu_args, stream=stream, shared_mem=self.smem_size)
202204

203205
def memset(self, allocation, value, size):

kernel_tuner/backends/nvcuda.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ def run_kernel(self, func, gpu_args, threads, grid, stream=None):
278278
of the grid
279279
:type grid: tuple(int, int)
280280
"""
281+
if stream is None:
282+
stream = self.stream
281283
arg_types = list()
282284
for arg in gpu_args:
283285
if isinstance(arg, cuda.CUdeviceptr):

0 commit comments

Comments
 (0)