[OpenVINO EP] Fix constant output mis-routing for names containing '/' - #29882
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
@fdwr Can you help review this? Thanks. |
|
I'll review, but do you also have any contacts on the OpenVINO side to review? |
Hi @javier-intel, could you help review this change or find a suitable reviewer? Thanks. |
|
Tests passed ✅. |
Thanks, We need another approval before merging this, right? |
|
It looks good to me but I don't work in that code enough to feel confident. @ankitm3k can you please also take a look? |
@wangw-1991: Well ideally we'd have an OpenVINO expert review it too, but if ankitm3k doesn't have the time to approve, I'm also content to merge it, as we have two positive reviews by nonexperts :b. |
Thanks, I've already pinged him; let's wait and see. |
|
The openvino EP aka Legacy EP in this repo will soon reach end of dev cycle. To use the new ABI EP use the WinML APIs from builds available now at - wheel - https://pypi.org/project/onnxruntime-ep-openvino/ Nuget - http://nuget.org/packages/Intel.ML.OnnxRuntime.EP.OpenVINO |
Description
GetOutputTensorin the OpenVINO EP resolved a constant-folded output's OpenVINO friendly name back to an ONNX output by truncating at the first/and doing an exact-string lookup. OpenVINO appends a/sink_port_0suffix to the friendly name, and ONNX output names may themselves contain/, so a name likeD/x/sink_port_0was truncated toDand matched different output namedD. The constant was then written into the wrong output's slot; with a pre-bound fixed-size output buffer this is an out-of-bounds write.This PR:
/-suffix if that fails, so names containing/resolve correctly.FillOutputHelperbefore thestd::copy, so any residual size mismatch throws instead of overrunning the buffer.