Skip to navigation

holoscan::synchronize_cuda_streams

Beta
View as Markdown
HOLOSCAN_CORE_EXPORT expected<void, Error> holoscan::synchronize_cuda_streams(
cudaStream_t producer_stream,
cudaStream_t consumer_stream
)

Record an event on producer_stream and make consumer_stream wait on it.

No-op when the two streams are identical. Used to order Tensor-producing work on a producer stream before a consumer stream reads the result.

Returns: Empty on success, or an Error describing the failed CUDA call.

Parameters

producer_stream
cudaStream_t

The stream that produced the data.

consumer_stream
cudaStream_t

The stream that will consume the data.