Skip to content

[OnnxToTorch] Lower onnx.MeanVarianceNorm to torch dialect without expansion#4219

Merged
zjgarvey merged 5 commits into
llvm:mainfrom
zahidwx:feature/onnx-mvn
Aug 6, 2025
Merged

[OnnxToTorch] Lower onnx.MeanVarianceNorm to torch dialect without expansion#4219
zjgarvey merged 5 commits into
llvm:mainfrom
zahidwx:feature/onnx-mvn

Conversation

@zahidwx
Copy link
Copy Markdown
Contributor

@zahidwx zahidwx commented Jun 2, 2025

This PR takes care of #4218.

  • Lower onnx MeanVarianceNorm op to torch primitive ops.
  • Remove function expansion during import from onnx

@zahidwx zahidwx changed the title Lower to torch dialect without expansion [OnnxToTorch] Lower onnx.MeanVarianceNorm to torch dialect without expansion Jun 2, 2025
@zahidwx zahidwx force-pushed the feature/onnx-mvn branch 2 times, most recently from 643883e to ac5ce26 Compare June 2, 2025 10:29
@zahidwx zahidwx marked this pull request as ready for review June 2, 2025 11:18
@zahidwx
Copy link
Copy Markdown
Contributor Author

zahidwx commented Jun 10, 2025

Thoughts on this PR? Also checkout the related issue behind this PR - @vivekkhandelwal1 | @rsuderman | @stellaraccident | @ScottTodd

Comment thread python/torch_mlir/extras/onnx_importer.py
Comment thread lib/Conversion/TorchOnnxToTorch/DefaultDomainGtoP.cpp Outdated
Comment thread lib/Conversion/TorchOnnxToTorch/DefaultDomainGtoP.cpp Outdated
Comment thread lib/Conversion/TorchOnnxToTorch/DefaultDomainGtoP.cpp Outdated
Comment thread lib/Conversion/TorchOnnxToTorch/DefaultDomainGtoP.cpp Outdated
Comment thread lib/Conversion/TorchOnnxToTorch/DefaultDomainGtoP.cpp Outdated
@zahidwx zahidwx force-pushed the feature/onnx-mvn branch from ac5ce26 to 338213f Compare July 1, 2025 07:05
zahidwx added 4 commits July 15, 2025 10:14
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
Copy link
Copy Markdown
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, except my query related to one of my previous comments.

Add negative axes lit tests for MVN

Signed-off-by: Zahid Wakeel <zahid.wakeel@multicorewareinc.com>
@zahidwx zahidwx force-pushed the feature/onnx-mvn branch from 338518b to 801ba0d Compare July 15, 2025 18:02
@zjgarvey zjgarvey merged commit 3eb2475 into llvm:main Aug 6, 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.

3 participants