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

[MLIR][ONNX] Add support for onnx.scan op #3516

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

Shukla-Gaurav
Copy link
Collaborator

This commit lowers onnx.scan op to torch.prim.Loop op and adds the lowering in the onnx pipeline.

@renxida
Copy link
Collaborator

renxida commented Jul 1, 2024

Might be a good idea to either run an e2eshark op test or a custom test case with a contrived graph "loop body"

just to make sure this actually runs and is consistent with onnxruntime.

Sometimes the PrimLoopOp lowers to linalg but IREE is unable to execute it due to problems with mutability in tensors.

@Shukla-Gaurav Shukla-Gaurav force-pushed the gaurav/scanop branch 2 times, most recently from ec91723 to 6140c09 Compare July 9, 2024 10:40
@Shukla-Gaurav Shukla-Gaurav force-pushed the gaurav/scanop branch 2 times, most recently from 81ca1ff to 9df0e29 Compare August 1, 2024 16:08
This commit lowers onnx.scan op to torch.prim.Loop op and adds the
lowering in the onnx pipeline.

Signed-Off-by: Gaurav Shukla <gaurav.shukla@amd.com>
@Shukla-Gaurav
Copy link
Collaborator Author

Might be a good idea to either run an e2eshark op test or a custom test case with a contrived graph "loop body"

just to make sure this actually runs and is consistent with onnxruntime.

Sometimes the PrimLoopOp lowers to linalg but IREE is unable to execute it due to problems with mutability in tensors.

Thanks @renxida for pointing out this. I am tracking the e2e test case here: nod-ai/SHARK-TestSuite#276

@Shukla-Gaurav
Copy link
Collaborator Author

@vivekkhandelwal1 @renxida can you please re-review and let me know if this looks good?

@Shukla-Gaurav Shukla-Gaurav merged commit 839fe90 into llvm:main Aug 5, 2024
3 checks passed
pkapris-syrmia pushed a commit to pkapris-syrmia/torch-mlir that referenced this pull request Aug 15, 2024
This commit lowers onnx.scan op to torch.prim.Loop op and adds the
lowering in the onnx pipeline.

Signed-off-by: Gaurav Shukla <gaurav.shukla@amd.com>
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