![]() |
ONNX Runtime
|
Configuration for initializing graphics interop on an EP factory. More...
#include <onnxruntime_c_api.h>
Public Attributes | |
| uint32_t | version |
| OrtGraphicsApi | graphics_api |
| void * | command_queue |
| Command queue/submission queue for graphics workloads (optional). | |
| const OrtKeyValuePairs * | additional_options |
| Additional API-specific options (optional). | |
Configuration for initializing graphics interop on an EP factory.
This structure contains all parameters needed to set up graphics interop between ONNX Runtime and an external graphics API (D3D12, Vulkan). The factory stores this configuration and uses it when creating synchronization streams.
Design rationale:
Example usage for D3D12:
| const OrtKeyValuePairs* OrtGraphicsInteropConfig::additional_options |
Additional API-specific options (optional).
Can be used for future extensibility without changing the struct layout. For example, Vulkan-specific queue family index, or D3D12 fence sharing flags.
| void* OrtGraphicsInteropConfig::command_queue |
Command queue/submission queue for graphics workloads (optional).
Optional. When provided, the factory may use it for efficient GPU-side synchronization with inference streams (performance optimization). When null, the Interop API still works; streams use the default context.
For D3D12: ID3D12CommandQueue* For Vulkan: VkQueue (cast to void*)
| OrtGraphicsApi OrtGraphicsInteropConfig::graphics_api |
The graphics API to use for interop
| uint32_t OrtGraphicsInteropConfig::version |
Must be ORT_API_VERSION