Skip to content

Conversation

@qti-yuduo
Copy link
Contributor

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.

@qti-yuduo qti-yuduo force-pushed the dev/yuduo/gather-cast-cl branch from 57dcbc0 to 25504e8 Compare July 29, 2025 23:34
@qti-yuduo qti-yuduo marked this pull request as draft July 29, 2025 23:57
@HectorSVC HectorSVC added the ep:QNN issues related to QNN exeution provider label Jul 30, 2025
@qti-yuduo qti-yuduo force-pushed the dev/yuduo/gather-cast-cl branch from 25504e8 to ea0df77 Compare July 31, 2025 20:42
@qti-yuduo qti-yuduo marked this pull request as ready for review July 31, 2025 20:43
@HectorSVC
Copy link
Contributor

/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
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@HectorSVC HectorSVC requested a review from Copilot July 31, 2025 22:08
Copy link
Contributor

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 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 AddInt64CastNode method 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

@HectorSVC
Copy link
Contributor

/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
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@HectorSVC HectorSVC merged commit 554cda5 into microsoft:main Aug 1, 2025
86 checks passed
sanketkaleoss pushed a commit to sanketkaleoss/onnxruntime that referenced this pull request Aug 11, 2025
…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.
gedoensmax pushed a commit to gedoensmax/onnxruntime that referenced this pull request Sep 2, 2025
…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.
qti-yuduo pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Sep 24, 2025
@qti-yuduo qti-yuduo deleted the dev/yuduo/gather-cast-cl branch September 24, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:QNN issues related to QNN exeution provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants