-
Notifications
You must be signed in to change notification settings - Fork 48
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
Failed to legalize operation onnx.Conv
.
#817
Comments
llvm/torch-mlir#3670 seems to be in flight : Do we need more fixes? |
Once that is landed, we can test it again and update. |
@pdhirajkumarprasad This PR llvm/torch-mlir#3670 is merged. Can you please test the fix? |
Complete IR:
|
We still have issue with conv and can be reproduce with below ir model.mlir
module {
func.func @main_graph(%arg0: !torch.vtensor<[1,128],si64>, %arg1: !torch.vtensor<[1,128],f32>, %arg3: !torch.vtensor<[?,768,128],f32>, %arg4: !torch.vtensor<[768,1,9],f32>) -> !torch.vtensor<[?,768,128],f32> attributes {torch.onnx_meta.ir_version = 8 : si64, torch.onnx_meta.opset_version = 17 : si64, torch.onnx_meta.producer_name = "pytorch", torch.onnx_meta.producer_version = "2.1.0"} {
%323 = torch.operator "onnx.Conv"(%arg3, %arg4) {torch.onnx.dilations = [1 : si64], torch.onnx.group = 768 : si64, torch.onnx.kernel_shape = [9 : si64], torch.onnx.pads = [4 : si64, 4 : si64], torch.onnx.strides = [1 : si64]} : (!torch.vtensor<[?,768,128],f32>, !torch.vtensor<[768,1,9],f32>) -> !torch.vtensor<[?,768,128],f32>
return %323 : !torch.vtensor<[?,768,128],f32>
}
} |
Hi @pdhirajkumarprasad, can you please tell me how many models are impacted through this issue? And the list of the failing ones too? The issue is that the Torch-MLIR does not have the support for 2d group convolution, and hence resulting in this failure. |
This is specifically a depthwise conv op. There isn't a linalg op for grouped 1-d conv, but there are depthwise 1-d conv ops in linalg dialect. |
we have 52 models failing due to this |
Fix added in llvm/torch-mlir#3770. |
Closing this since the PR is merged. |
The ONNX operation
onnx.Conv
fails withfailed to legalize operation 'onnx.Conv'
during lowering, as reported in #812.Duplicate of iree-org/iree#17944.
More details will be added later.
The text was updated successfully, but these errors were encountered: