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

torch.aten.convolution to linalg #642

Closed
Tracked by #347
AmosLewis opened this issue Apr 19, 2024 · 3 comments
Closed
Tracked by #347

torch.aten.convolution to linalg #642

AmosLewis opened this issue Apr 19, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@AmosLewis
Copy link
Contributor

AmosLewis commented Apr 19, 2024

Find this issue in nod-ai/SHARK-TestSuite#189
Failed op in u-net_brain_mri_vaiq_int8.default.onnx.torch.elide.mlir

Failed op signature
%221 = torch.aten.convolution %212, %216, %220, %80, %59, %58, %true, %59, %int1 : !torch.vtensor<[32,512,16,16],f32>, !torch.vtensor<[512,256,2,2],f32>, !torch.vtensor<[256],f32>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int -> !torch.vtensor<[32,256,32,32],f32>

To repeat the error

(mlir_venv) ➜  u-net_brain_mri_vaiq_int8 git:(reduceprod) ✗ torch-mlir-opt --torch-backend-to-linalg-on-tensors-backend-pipeline u-net_brain_mri_vaiq_int8.default.onnx.torch.mlir 
u-net_brain_mri_vaiq_int8.default.onnx.torch.mlir:238:12: error: failed to legalize operation 'torch.aten.convolution' that was explicitly marked illegal
    %221 = torch.aten.convolution %212, %216, %220, %80, %59, %58, %true, %59, %int1 : !torch.vtensor<[32,512,16,16],f32>, !torch.vtensor<[512,256,2,2],f32>, !torch.vtensor<[256],f32>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int -> !torch.vtensor<[32,256,32,32],f32>
@zjgarvey
Copy link
Collaborator

I think I'm going to pick this up if no one else wants to dig into the quantization support issues.

If someone wants to take this off of my hands, let me know. It might take a day or two for me to start.

@zjgarvey zjgarvey self-assigned this Apr 22, 2024
@zjgarvey
Copy link
Collaborator

Fails due to transposed convolutions not-yet implementing non-fp type transposes. I'll dig into this and see if I can make it work.

@zjgarvey
Copy link
Collaborator

torch-mlir PR #3240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants