ONNX Runtime
Loading...
Searching...
No Matches
OrtSyncStreamImpl Struct Reference

Struct that an EP implements if it wishes to implement Stream support. More...

#include <onnxruntime_ep_c_api.h>

Public Member Functions

OrtStatusCreateNotification (OrtSyncStreamImpl *this_ptr, OrtSyncNotificationImpl **notification)
 Create an OrtSyncNotificationImpl for the OrtSyncStreamImpl instance.
 
OrtStatusFlush (OrtSyncStreamImpl *this_ptr)
 Flush the stream.
 
OrtStatusOnSessionRunEnd (OrtSyncStreamImpl *this_ptr)
 Notify the stream that a session run has ended.
 

Public Attributes

uint32_t ort_version_supported
 Must be initialized to ORT_API_VERSION.
 
void(* Release )(OrtSyncStreamImpl *this_ptr)
 Release the OrtSyncStreamImpl instance.
 
void *(* GetHandle )(OrtSyncStreamImpl *this_ptr)
 Get the handle of the stream.
 

Detailed Description

Struct that an EP implements if it wishes to implement Stream support.

This struct provides the overrides for onnxruntime::Stream's virtual methods.

Since
Version 1.23.

Member Function Documentation

◆ CreateNotification()

OrtStatus * OrtSyncStreamImpl::CreateNotification ( OrtSyncStreamImpl this_ptr,
OrtSyncNotificationImpl **  notification 
)

Create an OrtSyncNotificationImpl for the OrtSyncStreamImpl instance.

Parameters
[in]this_ptrPointer to the OrtSyncStreamImpl instance
[out]notificationThe new OrtSyncNotificationImpl instance.
Since
Version 1.23.

◆ Flush()

OrtStatus * OrtSyncStreamImpl::Flush ( OrtSyncStreamImpl this_ptr)

Flush the stream.

This is called by ORT to flush the stream, ensuring that all operations submitted to the stream are completed.

Parameters
[in]this_ptrPointer to the OrtSyncStreamImpl instance.
Since
Version 1.23.

◆ OnSessionRunEnd()

OrtStatus * OrtSyncStreamImpl::OnSessionRunEnd ( OrtSyncStreamImpl this_ptr)

Notify the stream that a session run has ended.

This is called by ORT to notify the stream that a session run has ended, allowing the stream to perform any necessary cleanup or finalization.

Parameters
[in]this_ptrPointer to the OrtSyncStreamImpl instance.
Since
Version 1.23.

Member Data Documentation

◆ GetHandle

void *( * OrtSyncStreamImpl::GetHandle) (OrtSyncStreamImpl *this_ptr)

Get the handle of the stream.

This returns the native handle for the stream. e.g. cudaStream_t for CUDA streams.

Parameters
[in]this_ptrPointer to the OrtSyncStreamImpl instance.
Returns
The handle of the stream.
Since
Version 1.23.

◆ ort_version_supported

uint32_t OrtSyncStreamImpl::ort_version_supported

Must be initialized to ORT_API_VERSION.

◆ Release

void( * OrtSyncStreamImpl::Release) (OrtSyncStreamImpl *this_ptr)

Release the OrtSyncStreamImpl instance.

This is called by ORT when the OrtSyncStreamImpl instance is no longer needed. The implementation should release any resources held by the instance.

Parameters
[in]this_ptrPointer to the OrtSyncStreamImpl instance.
Since
Version 1.23.