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

Use linalg.index to lower aten.reflection_pad2d #4105

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

pravg-amd
Copy link
Contributor

"aten.reflection_pad2d" was lowered to linalg using affine maps of the form {indexing_maps = [affine_map<(d0, d1) -> (d0, -d1 + 1)>, affine_map<(d0, d1) -> (d0, d1)>]}.

This causes lowering issues in downstream passes such as ""BinaryOpExpr(AffineBinaryOpExpr): Assertion `cast(expr.getRHS()).getValue() > 0 && "nonpositive multiplying coefficient"' failed."

Using linalg.index with tensor.extract op instead of the above affine map helps in successful compilation of the same.

@pravg-amd
Copy link
Contributor Author

pravg-amd commented Mar 26, 2025

Enables successful compilation of ~10 onnx zoo models which were failing due to this.

iree-org/iree#20110

Copy link
Collaborator

@jinchen62 jinchen62 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@praveen-g-ctt praveen-g-ctt merged commit 692b2c0 into llvm:main Mar 27, 2025
3 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.

4 participants