CUDAnative: examples using CUDA streams?

From this topic we can see that CUDA streams are supported. Are there any code examples using CUDA streams in CUDAnative to help with first steps?
I.e. how to create a stream, use it in a kernel call, sync on the stream, etc.

Lacking proper documentation (which I hope I’ll be able to get to in a couple of weeks), have a look at the tests:

Basically, stream creation etc is part of CUDAdrv, and in CUDAnative you just pass a stream argument to @cuda. And FYI, there isn’t a good mechanism to use streams with CuArrays yet.

1 Like

Thanks for the examples!

@maleadt, to my understanding, these tests only check that CuStream creates a new, distinct stream at every invocation, but they do not test that these streams do overlap at execution, i.e. that the kernels on these streams run concurrently (or do I get it wrong?). Is there any test that checks this functionality?
I am asking, because I cannot get streams to overlap as reported in this topic. This is fundamental to overlap communication and computation in my application…

1 Like

No. If you have any suggestions for such tests, let me know.

I do not have any suggestions right now, but I let you know if I come up with something during my investigations on overlapping of streams.