-
Notifications
You must be signed in to change notification settings - Fork 520
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
OnnxToTorch support for onnx.InstanceNormalization op #2710
Conversation
fb3c6c5
to
7c54a46
Compare
Hi @aldesilv, I did take a look at your code and I think there's an issue with the dtype check for the instance norm op. The PyTorch doesn't support the device cpu/meta (both of which I tried) for the tensors to this op. I think for now you can just add a comment saying the device is not supported hence unable to check the dtype function and remove the check. @ramiro050, would you like to add something to this? |
9877011
to
353be55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aldesilv, can you please add some e2e tests for quantized::instance_norm op so that your TorchToLinalg lowering can be verified?
projects/pt1/python/torch_mlir/jit_ir_importer/build_tools/torch_ods_gen.py
Show resolved
Hide resolved
bb8d9a4
to
e4e9670
Compare
when using quantized instance norm (torch.ao.nn.quantized.InstanceNorm2d) in an e2e test, |
8483964
to
69343c3
Compare
will add a test in torch-mlir/test/Conversion/TorchToLinalg |
bf4d751
to
1cdbb20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appologies for the late review. I have one question
3a82460
to
c509fe3
Compare
projects/pt1/python/torch_mlir_e2e_test/test_suite/norm_like.py
Outdated
Show resolved
Hide resolved
b1422fa
to
382bfc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a couple small changes
projects/pt1/python/torch_mlir_e2e_test/test_suite/norm_like.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
nod-ai/SHARK-ModelDev#327