-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[QNN EP] Bug fix: multiple consumer for cast result in name conflicts #25584
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
Conversation
57dcbc0 to
25504e8
Compare
25504e8 to
ea0df77
Compare
|
/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows x64 QNN CI Pipeline |
|
Azure Pipelines successfully started running 5 pipeline(s). |
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 fixes a bug in the QNN EP where multiple consumers of the same cast node for Gather indices caused name conflicts. The fix conditionally skips adding cast nodes and tensors when they already exist.
Key changes:
- Removed the centralized
AddInt64CastNodemethod to allow for more context-aware cast handling - Added conditional checks to prevent duplicate tensor and node creation
- Standardized QNN operation names to use constants instead of string literals
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| qnn_model_wrapper.h | Removes the centralized AddInt64CastNode method |
| gather_op_builder.cc | Implements inline cast handling with duplicate prevention logic and fixes function name typo |
| transpose_op_builder.cc | Updates cast operation to use QNN_OP_CAST constant |
| topk.cc | Updates cast operation to use QNN_OP_CAST constant |
| base_op_builder.cc | Updates cast operation to use QNN_OP_CAST constant |
onnxruntime/core/providers/qnn/builder/opbuilder/gather_op_builder.cc
Outdated
Show resolved
Hide resolved
…lder.cc Co-authored-by: Copilot <[email protected]>
|
/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows x64 QNN CI Pipeline |
|
Azure Pipelines successfully started running 5 pipeline(s). |
…microsoft#25584) Bug fix for QNN EP when multiple consumer of same cast node inserted for Gather indices. Now conditionally skip adding the node when already happen.
…microsoft#25584) Bug fix for QNN EP when multiple consumer of same cast node inserted for Gather indices. Now conditionally skip adding the node when already happen.
- pick microsoft#25584 - pick microsoft#25635 - pick microsoft#25673 - pick microsoft#25702 - pick microsoft#25738
Bug fix for QNN EP when multiple consumer of same cast node inserted for Gather indices. Now conditionally skip adding the node when already happen.