Skip to content

Conversation

@intbf
Copy link

@intbf intbf commented Jan 27, 2026

Description

To stay on the safer side, the ext initializer feature was limited with a 32MB threshold for all ext initializers. We can now remove the artificial condition.

Related to CVS-174613

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the artificial 32MB threshold for external initializers in the OpenVINO execution provider, allowing the feature to be used more broadly without size limitations.

Changes:

  • Removed the 32MB size threshold check in backend_manager.cc
  • Refactored the test code to use static test suite setup/teardown for better resource management

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
onnxruntime/core/providers/openvino/backend_manager.cc Removed the MAX_EMBEDDED_INITIALIZER_SIZE constant and simplified the condition for using external initializers
onnxruntime/test/providers/openvino/openvino_ep_ext_init.cc Refactored test to use static class members and suite-level setup/teardown, eliminating per-test file operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MayureshV1 MayureshV1 requested review from Copilot and ericcraw and removed request for ericcraw January 28, 2026 00:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MayureshV1 MayureshV1 removed the request for review from ericcraw February 6, 2026 18:20
Remove the 32MB threshold for embedding external initializers in the ONNX model proto. Now, if external weights are present and there is more than one external initializer, data will not be embedded regardless of size. CVS-174613
Refactored the OVEP_ExtInit_Tests to generate and load the ONNX model and large external initializer data only once per test suite, rather than per test case. Model and weights are now stored as static members and cleaned up after all tests. This reduces redundant file I/O and memory usage. Test logic and device probing remain unchanged.
Replaced manual error handling (throwing std::runtime_error) with Google Test ASSERT_TRUE assertions for model serialization, file opening, and memory loading. Also remove explicit calls to .close() of file streams, since they are in separate scopes.
@intbf intbf force-pushed the ext_init_remove_threshold branch from e81f35d to c78fe8a Compare February 11, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants