Skip to content
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

[QNN EP] Fix topological node unit traversal during validation #17913

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

adrianlizarraga
Copy link
Contributor

Description

We need to ensure that tensors are first created and validated by their producers. If we don't, then builders that need to modify their outputs may not be able to do so if consumers are processed first (due to caching of tensors). For example, the Tanh builder may need to override its output quant param for 16-bit QDQ. I've encountered a scenario (while working on a partner model) where the override was not being correctly applied due to the graph traversal order.

I tried to fix this bug in a previous PR, but my fix was incorrect.

Motivation and Context

Copy link
Contributor

@HectorSVC HectorSVC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@adrianlizarraga adrianlizarraga marked this pull request as ready for review October 12, 2023 18:21
@adrianlizarraga
Copy link
Contributor Author

THe license/cla check is stuck on "Waiting for status to be reported". Will close and re-open to try and get it to run.

@adrianlizarraga adrianlizarraga merged commit 4e2a03d into main Oct 13, 2023
100 of 102 checks passed
@adrianlizarraga adrianlizarraga deleted the adrianl/qnn-fix-topo-order-validation branch October 13, 2023 06:37
jchen351 pushed a commit that referenced this pull request Oct 18, 2023
### Description
We need to ensure that tensors are first created and validated by their
producers. If we don't, then builders that need to modify their outputs
may not be able to do so if consumers are processed first (due to
caching of tensors). For example, the Tanh builder may need to override
its output quant param for 16-bit QDQ. I've encountered a scenario
(while working on a partner model) where the override was not being
correctly applied due to the graph traversal order.

I tried to fix this bug in a previous
[PR](#17877 (comment)),
but my fix was incorrect.
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
…soft#17913)

### Description
We need to ensure that tensors are first created and validated by their
producers. If we don't, then builders that need to modify their outputs
may not be able to do so if consumers are processed first (due to
caching of tensors). For example, the Tanh builder may need to override
its output quant param for 16-bit QDQ. I've encountered a scenario
(while working on a partner model) where the override was not being
correctly applied due to the graph traversal order.

I tried to fix this bug in a previous
[PR](microsoft#17877 (comment)),
but my fix was incorrect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants