-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix the accuracy issue from onnxruntime single layer test case #31283
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
base: master
Are you sure you want to change the base?
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.
Pull Request Overview
This pull request fixes accuracy issues in the ONNX runtime single layer test case by aligning parameters with ONNX operators, enabling 3D tensor resize operations on 3 dimensions, and optimizing performance by avoiding unnecessary reordering when the lowest dimension doesn't scale.
Key changes include:
- Updated spatial dimension calculation to dynamically determine dimensions based on input/output tensor differences
- Added support for ONNX resize operator's antialias and axes attributes
- Implemented logic to avoid reordering when the lowest dimension remains unchanged
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/plugins/intel_cpu/src/nodes/interpolate.h | Updates function signature to accept source and destination dimensions |
src/plugins/intel_cpu/src/nodes/interpolate.cpp | Implements dynamic spatial dimension calculation and reorder optimization logic |
src/frontends/onnx/frontend/src/op/resize.cpp | Adds support for antialias and axes attributes in ONNX resize operator |
Comments suppressed due to low confidence (2)
src/plugins/intel_cpu/src/nodes/interpolate.cpp:2549
- [nitpick] The magic number 3 should be replaced with a named constant or derived from srcDims.size() to make the code more maintainable and self-documenting.
auto* selectedPD = getSelectedPrimitiveDescriptor();
src/plugins/intel_cpu/src/nodes/interpolate.cpp:2041
- [nitpick] The lambda function name 'avoidReorder' is ambiguous. Consider renaming it to 'shouldAvoidReorder' or 'canAvoidReorder' to better indicate it returns a boolean condition.
auto avoidReorder = [](const auto& inputDataShape, const auto& outputShape) {
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.
@sgbihu, please provide tests
@chenhu-wang , could you please review? |
Details:
reorder
when the lowest dimension doesn't scale.Tickets: