HIP: Heterogenous-computing Interface for Portability
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Stream Management

Functions

hipError_t hipStreamCreateWithFlags (hipStream_t *stream, unsigned int flags)
 Create an asynchronous stream. More...
 
hipError_t hipStreamWaitEvent (hipStream_t stream, hipEvent_t event, unsigned int flags)
 Make the specified compute stream wait for an event. More...
 
hipError_t hipStreamSynchronize (hipStream_t stream)
 Wait for all commands in stream to complete. More...
 
hipError_t hipStreamDestroy (hipStream_t stream)
 Destroys the specified stream. More...
 
hipError_t hipStreamGetFlags (hipStream_t stream, unsigned int *flags)
 Return flags associated with this stream. More...
 

Detailed Description

----------------------------------------------------------------------------------------------—

The following Stream APIs are not (yet) supported in HIP:

Function Documentation

hipError_t hipStreamCreateWithFlags ( hipStream_t stream,
unsigned int  flags 
)

Create an asynchronous stream.

Parameters
[in,out]streamPointer to new stream
[in]flagsto control stream creation.
Returns
hipSuccess, hipErrorInvalidValue

Create a new asynchronous stream. Flags controls behavior of the stream. See hipStreamDefault, hipStreamNonBlocking. hipStream_t are under development - with current HIP use the NULL stream.

hipError_t hipStreamDestroy ( hipStream_t  stream)

Destroys the specified stream.

Parameters
[in,out]streamValid pointer to hipStream_t. This function writes the memory with the newly created stream.
Returns
hipSuccess

Destroys the specified stream.

If commands are still executing on the specified stream, some may complete execution before the queue is deleted.

The queue may be destroyed while some commands are still inflight, or may wait for all commands queued to the stream before destroying it.

Returns
hipSuccess, hipErrorInvalidResourceHandle
hipError_t hipStreamGetFlags ( hipStream_t  stream,
unsigned int *  flags 
)

Return flags associated with this stream.

Parameters
[in]stream
[in,out]flags
Returns
hipSuccess, hipErrorInvalidValue, hipErrorInvalidResourceHandle

Return flags associated with this stream in *flags.

See Also
hipStreamCreateWithFlags
Returns
hipSuccess
hipError_t hipStreamSynchronize ( hipStream_t  stream)

Wait for all commands in stream to complete.

If the null stream is specified, this command blocks until all

This command honors the hipDeviceLaunchBlocking flag, which controls whether the wait is active or blocking.

This command is host-synchronous : the host will block until the stream is empty.

TODO

hipError_t hipStreamWaitEvent ( hipStream_t  stream,
hipEvent_t  event,
unsigned int  flags 
)

Make the specified compute stream wait for an event.

Parameters
[in]streamstream to make wait.
[in]eventevent to wait on
[in]flagscontrol operation [must be 0]
Returns
hipSuccess, hipErrorInvalidResourceHandle

This function inserts a wait operation into the specified stream. All future work submitted to stream will wait until event reports completion before beginning execution. This function is host-asynchronous and the function may return before the wait has completed.

Bug:
This function conservatively waits for all work in the specified stream to complete.