onnxruntime
0f153de8 - Add API GetTensorElementTypeAndShapeDataReference (#27175)

Commit
2 days ago
Add API GetTensorElementTypeAndShapeDataReference (#27175) ### Description Adds C/C++ API named `GetTensorElementTypeAndShapeDataReference` that returns an OrtValue tensor's shape and type without allocating a new buffer for the shape data. ### Motivation and Context This new API function can be used instead of `OrtApi::GetTypeInfo()` or `OrtApi::GetTensorTypeAndShape` to decrease the number of heap allocations and thus improve inference latency for plugin EPs kernels that frequently retrieve tensor shapes during inference. (e.g., WebGPU plugin EP)
Parents
Loading