onnxruntime
b84e249b - [OpenVINO EP] Fix get/set_float_initializer_data for raw_data backed float initializers (#31138)

Commit
22 days ago
[OpenVINO EP] Fix get/set_float_initializer_data for raw_data backed float initializers (#31138) ### Description `get_float_initializer_data` / `set_float_initializer_data` assumed a float initializer always stores its value in the typed `float_data` field. When the value lives in `raw_data` instead, `float_data(0)` reads out of bounds and `set_float_data(0, ...)` writes out of bounds — both undefined behaviour. Both functions now select the field that actually holds the data: use `float_data` when it is non-empty, otherwise read/write `raw_data` (guarded by size checks). ### Testing Adds `openvino_ov_protobuf_utils_test.cc` covering get/set against both `float_data` and `raw_data` backed float scalars. Because the OpenVINO EP is built as a shared-library module with hidden symbols, `ov_protobuf_utils.cpp` is compiled directly into `onnxruntime_provider_test` so the tests can link.
Author
Parents
Loading