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 'torch.operator' that was explicitly marked illegal : ONNX.Gather #853

Open
pdhirajkumarprasad opened this issue Sep 27, 2024 · 1 comment

Comments

@pdhirajkumarprasad
Copy link

for the given IR

module {
  func.func @"torch-jit-export"(%arg0: !torch.vtensor<[?,?],si64>, %arg1:!torch.vtensor<[28996,768],f16>) -> !torch.vtensor<[?,?,768],f16> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 12 : si64, torch.onnx_meta.producer_name = "onnxruntime.transformers", torch.onnx_meta.producer_version = "1.13.0"} {
    %362 = torch.operator "onnx.Gather"(%arg1, %arg0) : (!torch.vtensor<[28996,768],f16>, !torch.vtensor<[?,?],si64>) -> !torch.vtensor<[?,?,768],f16> 
    return %362 : !torch.vtensor<[?,?,768],f16>
  }
}

getting error as

t1.mlir:3:12: error: failed to legalize operation 'torch.operator' that was explicitly marked illegal

command:

torch-mlir-opt -split-input-file -verify-diagnostics -convert-torch-onnx-to-torch t1.mlir
@zjgarvey
Copy link
Collaborator

What models is this affecting? It seems like a versioning issue.

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

2 participants