-
Notifications
You must be signed in to change notification settings - Fork 57
[CVS-169168] Change name of metadata file and add filepath validation #717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CVS-169168] Change name of metadata file and add filepath validation #717
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supports all 3 requested cases:
- Trigger error if weights file can't be found
- Append model name to metadata.bin
- Collocate metadata.bin with ep context model during context generation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identified issues in code flow through unit testing where metadata.bin was using original model path and name instead of epctx name. Needs fixing.
1f09229 to
9b3e51d
Compare
…r.cc Add Metadata file path to error string Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
9b3e51d to
21506c6
Compare
There was a problem hiding this 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 addresses the EPctx metadata behavior by renaming the metadata file and adding filepath validation to enhance the weight sharing scenario.
- Adjusted metadata file paths during both inference and generation phases.
- Refactored error handling messages when reading and writing metadata.
- Added a new member in the shared context to store metadata file path.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| onnxruntime/core/providers/openvino/openvino_execution_provider.cc | Updated metadata reading and generation logic with filepath validation and improved error handling. |
| onnxruntime/core/providers/openvino/contexts.h | Added a new field to store the metadata file path. |
| onnxruntime/core/providers/openvino/backend_manager.cc | Adjusted metadata-dependent operations and error reporting for initializer file. |
onnxruntime/core/providers/openvino/openvino_execution_provider.cc
Outdated
Show resolved
Hide resolved
…r.cc Co-authored-by: Copilot <[email protected]>
da39e24 to
73de0f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good ! Behavior is verified and meets the requirement
…#717) * Change name of metadata file and add filepath validation * Save metadata file path in shared context for use across model compilation * Fix metadata file path initialization * Check that metadata file is created
Description
Fix EPctx Metadata behavior for weight sharing scenario and update naming convention to avoid weights duplication
Motivation and Context
Fixes a Phi Silica accuracy failure when external data file is in original folder but EPCtx, metadata and blobs are in a separate folder
https://jira.devtools.intel.com/browse/CVS-169168