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

Error Compiling T5 PyTorch Model #1977

Open
mariecwhite opened this issue Mar 27, 2023 · 3 comments
Open

Error Compiling T5 PyTorch Model #1977

mariecwhite opened this issue Mar 27, 2023 · 3 comments

Comments

@mariecwhite
Copy link

What happened?

When compiling the PyTorch model T5-base, I run into this error:

torch_mlir.compiler_utils.TorchMlirCompilerError: Lowering TorchScript IR -> Torch Backend IR failed with the following diagnostics:
error: 'func.call' op operand type mismatch: expected operand type '!torch.float', but provided '!torch.number' for operand number 0
note: see current operation: %2092 = "func.call"(%1008, %2088, %2089, %2090, %2091) {callee = @__torch_mlir_shape_fn.aten.arange} : (!torch.number, !torch.optional<int>, !torch.optional<int>, !torch.optional<Device>, !torch.optional<bool>) -> !torch.list<int>

Steps to reproduce your issue

Run:

torch-mlir-opt -pass-pipeline='builtin.module(torchscript-module-to-torch-backend-pipeline{backend-legal-ops=torch.aten.flatten.using_ints})' ./t5.mlir

MLIR file: t5.zip

Version information

Torch-MLIR version 20230222.757
Torch version 2.0.0.dev20230212+cu117
IREE version 20230221.437

@mariecwhite
Copy link
Author

FYI @monorimet

@ramiro050
Copy link
Collaborator

This is an issue with how the shape library handles Scalars. I should have a fix for it in a couple of days

@ramiro050
Copy link
Collaborator

Ended up taking less than expected. This should fix the !torch.number isue: #1978. The error I get next is due to there currently being no support for aten.min.other

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