-
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
torch_mlir.tools.import_onnx misses shape inference #3593
Comments
Also seems like a onnx.Identity issue to me. Is the result of onnx.Reshape supposed to have a specific shape? Or should we add the support of the unknown shape for the onnx.Transpose? |
Where did you get this IR from? The shapes on the |
@rsuderman It's from one of models imported from ONNX. There are a lot of models having same problem. So is it like a onnx.Identity issue? Cuz in the same model I saw
where the %73 is the %0 constant in repro ir. |
Is a verifier missing? I'd expect you could compile with |
This looks like a shape inference issue to me. Are you using the torch-mlir import_onnx? |
Got dynamic shapes instead of missing shapes by using
|
Setting opset-version as 21 fixes the issue. |
Repro:
https://gist.github.com/jinchen62/554020991f814bfa3b6ee61287a78d49
Command:
torch-mlir-opt -pass-pipeline='builtin.module(func.func(convert-torch-onnx-to-torch),torch-lower-to-backend-contract,func.func(cse,canonicalize))' repro_transpose.mlir > repro_transpose_torch.mlir
Error:
The text was updated successfully, but these errors were encountered: