# CUDA streams, default stream zero

**URL:** <https://forums.developer.nvidia.com/t/cuda-streams-default-stream-zero/30730>\
**Category:** CUDA Programming and Performance\
**Created:** [September 10, 2013, 1:50pm UTC](https://forums.developer.nvidia.com/t/cuda-streams-default-stream-zero/30730 "2013-09-10T13:50:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkussLonondon](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@MarkussLonondon](https://forums.developer.nvidia.com/u/MarkussLonondon)\
**Post date:** [September 10, 2013, 1:50pm UTC](https://forums.developer.nvidia.com/t/cuda-streams-default-stream-zero/30730/1 "2013-09-10T13:50:54Z")

</div>

Hi there,

I i have a quick question regarding cuda streams. I have a big project which contains about 30+ different kernel calls, which I have created between 2009 and now.  
I have to implement an additional kernel now which could be perfectly executed while the others are doing their thing. So I thought that sounds like a perfect use case for a stream.  
Question now, as far as I got it not mentioning a stream number results in a “0” stream, is it then possible that I only create one more kernel with foo\_kernel\<\<\< , , , 1\>\>\>() or do i have to add stream numbers to all my legacy kernels as well. I know that I will still have to do additional memcopies and sync barriers.

thanks in advance

Markus

---

<div class="post-metadata">

**Author:** ![cbuchner1](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/cbuchner1/32/14168_2.png) [@cbuchner1](https://forums.developer.nvidia.com/u/cbuchner1)\
**Post date:** [September 10, 2013, 3:55pm UTC](https://forums.developer.nvidia.com/t/cuda-streams-default-stream-zero/30730/2 "2013-09-10T15:55:40Z")

</div>

I think for concurrent execution you need to have all kernels in non-default streams.  
So letting the legacy kernels reside in default stream #0 won’t work for you.

Christian

---

<div class="post-metadata">

**Author:** ![JFSebastian](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jfsebastian/32/75602_2.png) [@JFSebastian](https://forums.developer.nvidia.com/u/JFSebastian)\
**Post date:** [September 10, 2013, 4:58pm UTC](https://forums.developer.nvidia.com/t/cuda-streams-default-stream-zero/30730/3 "2013-09-10T16:58:26Z")

</div>

There are limitations on CUDA commands issued to the default stream, see

[url][parallel processing - Concurrency of CUDA default stream with created streams - Stack Overflow](http://stackoverflow.com/questions/13331995/can-kernel-function-cuda-in-default-stream-and-created-stream-running-current%5B/url%5D)

So, a good practice is trying to avoid default streams.
