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

Only unroll prim loop-like ops within a torch.shape.calculate region #3812

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

zjgarvey
Copy link
Collaborator

@zjgarvey zjgarvey commented Oct 22, 2024

Reports a match failure for the pattern FullyUnrollPrimLoop when the loop op is not in a region defined by a torch.shape.calculate op.

This is needed to avoid unrolling prim loops generated by ONNX IR, since we are applying shape refinement in the torch-onnx-to-torch-backend-pipeline introduced in fa4794d .

See also the discussion in iree-org/iree#18867 (comment)

Copy link
Collaborator

@vivekkhandelwal1 vivekkhandelwal1 left a comment

Choose a reason for hiding this comment

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

LGTM

@vivekkhandelwal1
Copy link
Collaborator

Hi @zjgarvey, I'm merging this patch since it's needed for the Torch-MLIR bump in IREE.

@vivekkhandelwal1 vivekkhandelwal1 merged commit 55ff110 into llvm:main Oct 23, 2024
3 checks passed
Max191 added a commit to iree-org/torch-mlir that referenced this pull request Oct 31, 2024
AmosLewis added a commit to AmosLewis/torch-mlir that referenced this pull request Nov 1, 2024
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