Hi, I have the same question.
I know that running a mex-function it is possible to setup the kernel launch using a code similar to the following:
cudaStream_t stream; // CUDA streams are of type `cudaStream_t`.
cudaStreamCreate(&stream); // Note that a pointer must be passed to `cudaCreateStream`.
someKernel<<<number_of_blocks, threads_per_block, 0, stream>>>(); // `stream` is passed as 4th EC argument.
cudaStreamDestroy(stream); // Note that a value, not a pointer, is passed to `cudaDestroyStream`.
However, is there any way to create a non-default CUDA stream while constructing the CUDAKernel Objec? For instance, is there a command in which the "stream" can be specified? e.g.
k = parallel.gpu.CUDAKernel('myfun.ptx','myfun.cu','stream');
Or maybe during CUDAKernel Object Properties? e.g.
k.ThreadBlockSize = [1024,1,1];
k.GridSize = [500,1,1];
k.Stream = 'stream1'
If someone knows something... Please, help me!