You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make_simple_dynamo_backend does not work for single argument models. To support multiple args, it takes in *inputs. In case of a single torch.Tensor input it will unpack it instead of handling it in its entirety.
Specifically for the example below you will get the following error:
`File "/disk1/ttrouwen/software/compiler/build/torch-mlir/python_packages/dmir_compiler/torch_mlir/dynamo.py", line 144, in dynamo_callable
result = user_callable(*inputs)
TypeError: backend.<locals>.exec() takes 1 positional argument but 64 were given`
For the sake of brevity, this example returns gm.forward and does not use torch-mlir in the backend implementation. However, the bug is also present when torch-mlir is used in the backend.
Possible solution
In the file torch_mlir/dynamo.py the dynamo_callable function takes in *inputs. This should only be the case if len(example_inputs) > 1.
The text was updated successfully, but these errors were encountered:
Description
make_simple_dynamo_backend
does not work for single argument models. To support multiple args, it takes in*inputs
. In case of a singletorch.Tensor
input it will unpack it instead of handling it in its entirety.Specifically for the example below you will get the following error:
Example
For the sake of brevity, this example returns
gm.forward
and does not usetorch-mlir
in the backend implementation. However, the bug is also present whentorch-mlir
is used in the backend.Possible solution
In the file
torch_mlir/dynamo.py
thedynamo_callable
function takes in*inputs
. This should only be the case iflen(example_inputs) > 1
.The text was updated successfully, but these errors were encountered: