Skip to content

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

Merged
cbalint13 merged 1 commit into
apache:mainfrom
f2013519:main
Sep 8, 2024
Merged

[relay][qnn]: Fix qnn.avg_pool2d layout inference#17339
cbalint13 merged 1 commit into
apache:mainfrom
f2013519:main

Conversation

@f2013519

@f2013519 f2013519 commented Sep 5, 2024

Copy link
Copy Markdown
Contributor

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

f2013519 commented Sep 5, 2024

Copy link
Copy Markdown
Contributor Author

@masahi @kparzysz-quic @quic-sanirudh

PTAL, thanks

@cbalint13 cbalint13 left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Thanks @f2013519 for the fix !

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