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

[relay][qnn]: Fix qnn.avg_pool2d layout inference #17339

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

f2013519
Copy link
Contributor

@f2013519 f2013519 commented Sep 5, 2024

Issue:
Currently the qnn.avg_pool2d operator does not take the layout specified with the Convert Layout pass.

Cause:
The layout of the zero point and scale tensors are specified as "undefined". This causes the Convert Layout pass to bail and maintain the original layout.

Fix:
The fix updates the layouts for the scale and zero point tensors to be "channel" layout, similar to how it is done for qnn.conv2d.

Testing:
Added unit test

@f2013519
Copy link
Contributor Author

f2013519 commented Sep 5, 2024

@masahi @kparzysz-quic @quic-sanirudh

PTAL, thanks

Copy link
Contributor

@cbalint13 cbalint13 left a comment

Choose a reason for hiding this comment

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

LGTM

@cbalint13 cbalint13 self-assigned this Sep 8, 2024
@cbalint13
Copy link
Contributor

Thanks @f2013519 for the fix !

@cbalint13 cbalint13 merged commit 35fdf8b into apache:main Sep 8, 2024
19 of 20 checks passed
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.

2 participants