Contains helper functions for a Loop OrtKernelImpl created via OrtEpApi::CreateLoopKernel.
More...
#include <onnxruntime_ep_c_api.h>
|
| OrtStatus * | ConcatOutput (OrtLoopKernelHelper *this_ptr, void *stream_handle, const OrtValue *const *per_iteration_outputs, size_t num_per_iteration_outputs, void *output, size_t output_size_in_bytes) |
| | Helper function that concatenates OrtValue instances from each loop iteration into a single pre-allocated output buffer.
|
| |
Contains helper functions for a Loop OrtKernelImpl created via OrtEpApi::CreateLoopKernel.
- Since
- Version 1.24.
◆ ConcatOutput()
| OrtStatus * OrtLoopKernelHelper::ConcatOutput |
( |
OrtLoopKernelHelper * |
this_ptr, |
|
|
void * |
stream_handle, |
|
|
const OrtValue *const * |
per_iteration_outputs, |
|
|
size_t |
num_per_iteration_outputs, |
|
|
void * |
output, |
|
|
size_t |
output_size_in_bytes |
|
) |
| |
Helper function that concatenates OrtValue instances from each loop iteration into a single pre-allocated output buffer.
- Note
- Implementing this function is required for all Loop opset versions.
- Parameters
-
| [in] | this_ptr | The OrtLoopKernelHelper instance. |
| [in] | stream_handle | Optional native stream handle that enables asynchronous operations. May be NULL. |
| [in] | per_iteration_outputs | Array of OrtValue instances from each iteration. All OrtValue elements have the same shape. |
| [in] | num_per_iteration_outputs | The number of OrtValue* elements in the per_iteration_outputs array. |
| [out] | output | The pre-allocated output buffer. Memory is allocated on the device for the EP running the Loop node. |
| [in] | output_size_in_bytes | The size in bytes of the output buffer. It is guaranteed to be large enough to hold the concatenated data of each element in per_iteration_outputs. |
- Returns
- If no error, nullptr will be returned. If there is an error, a pointer to an OrtStatus that contains error details will be returned. Use OrtApi::ReleaseStatus to free this pointer.
- Since
- Version 1.24.
◆ ort_version_supported
| uint32_t OrtLoopKernelHelper::ort_version_supported |
Must be initialized to ORT_API_VERSION.
◆ Release
Called by ORT to release the OrtLoopKernelHelper instance and its resources.
- Parameters
-
- Since
- Version 1.24.