sometime I see code like this
test<<<1, 5,0,*str>>>(A, B, C); *str define as cudaStream_t *str
any idea what is this suppose doing.
sometime I see code like this
test<<<1, 5,0,*str>>>(A, B, C); *str define as cudaStream_t *str
any idea what is this suppose doing.
It is launching that test kernel into a cuda stream pointed to by the str pointer.
You can read about cuda streams in the programming guide:
“cudaMemcpy on stream-A” and “kernel execution on stream-B” can be overlapped (when A != B).
External Media
this image is a screen-shot of Nsight’s timeline.
green/purple represents cudaMemcpy, and red kernels.
k thx I’m new at this, btw where do I open nsight timeline? I only saw the profile option