Prefer Your Language

Search This Blog

CUDA Streams (What is CUDA Streams?)


Stream

A stream is a sequence of operations that are performed in order on the device.
Streams allows independent concurrent in-order queues of execution.

–Operations in different streams can be interleaved and overlapped, which can be used to hide data transfers between host and device.

•Use cudaStreamCreate() (runtime API) or cuStreamCreate() (Driver API) to create a stream of type cudaStream_t .  
–          The default stream (ID=0) need not be create.
--         Multiple streams exist within a single context, they share memory and other resources.
--         Copies & Kernel launches with the same stream parameter execute
in-order.



Function Prototype
Creates a new asynchronous stream.

cudaError_t cudaStreamCreate (cudaStream_t  * pStream)

Parameters:
pStream - Pointer to new stream identifier

Returns:
cudaSuccess, cudaErrorInvalidValue

Note that this function may also return error codes from previous, asynchronous launches.



Got Questions?
 Feel free to ask me any question because I'd be happy to walk you through step by step!

1 comment:

Help us to improve our quality and become contributor to our blog

Become a contributor to this blog. Click on contact us tab
Blogger Template by Clairvo