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

Failed to legalize operation onnx.Resize. #814

Closed
vinayakdsci opened this issue Sep 9, 2024 · 2 comments
Closed

Failed to legalize operation onnx.Resize. #814

vinayakdsci opened this issue Sep 9, 2024 · 2 comments
Assignees

Comments

@vinayakdsci
Copy link

vinayakdsci commented Sep 9, 2024

The ONNX operator onnx.Resize fails with Failed to legalize operation 'onnx.Resize' during lowering , as reported in #812

module {
  func.func @torch_jit(%arg0: !torch.vtensor<[1,3,240,240],f32>, %arg1: !torch.vtensor<[4],si64>) -> !torch.vtensor<[1,3,224,224],f32>  attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 21 : si64, torch.onnx_meta.producer_name = "pytorch", torch.onnx_meta.producer_version = "1.12.1"} {
    %none = torch.constant.none
    %497 = torch.operator "onnx.Resize"(%arg0, %none, %none, %arg1) {torch.onnx.coordinate_transformation_mode = "pytorch_half_pixel", torch.onnx.cubic_coeff_a = -7.500000e-01 : f32, torch.onnx.mode = "cubic", torch.onnx.nearest_mode = "floor"} : (!torch.vtensor<[1,3,240,240],f32>, !torch.none, !torch.none, !torch.vtensor<[4],si64>) -> !torch.vtensor<[1,3,224,224],f32> 
    return %497 : !torch.vtensor<[1,3,224,224],f32>
  }
}

command to reproduce:

torch-mlir-opt -split-input-file -verify-diagnostics -convert-torch-onnx-to-torch --mlir-print-ir-after-all t1.mlir
@kumardeepakamd
Copy link

@aldesilv seems to have worked on this (llvm/torch-mlir@ec6d7aa )

@pdhirajkumarprasad
Copy link

We are not seeing this issue anymore in ONNX models so closing this

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

No branches or pull requests

4 participants