Repository navigation
Fix FLOAT16 tensor attribute serialization in OrtGraphToProto - #33921
Open
Georgij Tsarin (crystarm) wants to merge 1 commit into
Open
Georgij Tsarin (crystarm) wants to merge 1 commit into
Georgij Tsarin (crystarm) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the FLOAT16 tensor attribute serialization fix.
No open issues 🎉
What changed in this PR
Fixes FLOAT16 tensor attribute serialization in OrtGraphToProto, addressing the dtype-10 rejection reported in #33919.
Changes:
- Adds the missing FLOAT16-to-TensorProto type mapping.
- Adds a
ConstantOfShaperegression test covering bothraw_dataandint32_data, checking the serialized type and payload and inference results with optimizations disabled.
| File | Description |
|---|---|
onnxruntime/test/ep_graph/test_ep_graph.cc |
Adds FLOAT16 attribute serialization and inference regression coverage. |
include/onnxruntime/core/providers/utils/ort_graph_to_proto.h |
Handles FLOAT16 tensor attributes in the serialization type switch. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
FLOAT16case to tensor attribute serialization inOrtGraphToProto.ConstantOfShaperegression test coveringraw_dataandint32_data, verifying the serialized payload and inference with optimizations disabled.Motivation and Context
Valid FP16 tensor attributes were rejected with
Unexpected ONNXTensorElementDataType with value 10.Fixes #33919.