We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
def export_mlir(model, dummy_input): from torch_mlir import torchscript module = torchscript.compile(model, dummy_input, output_type="tosa") print("TOSA OutputType\n") with open(f"test.mlir", "wt") as f: print(module.operation.get_asm(), file=f) if DEVICE == 'cuda': collate_fn = lambda x: x.cuda() else: collate_fn = lambda x: x output = executor.forward(inputs=collate_fn(dataset[0])) export_mlir( executor, collate_fn(dataset[0]), )
抛出了如下错误,该怎么解决呢? Exception has occurred: RuntimeError
Unknown type name 'dict': File "/home/congcong.zhang/.miniconda3/envs/torch-mlir/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 368 def forward( self, inputs: Union[dict, list, torch.Tensor], ~~~~ <--- HERE output_names:List[str] = None, hooks: Dict[str, RuntimeHook] = None File "/home/congcong.zhang/workspace/code/ppq/ppq/samples/test_resnet18.py", line 30, in export_mlir module = torchscript.compile(model, dummy_input, output_type="tosa") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/congcong.zhang/workspace/code/ppq/ppq/samples/test_resnet18.py", line 246, in export_mlir( RuntimeError: Unknown type name 'dict': File "/home/congcong.zhang/.miniconda3/envs/torch-mlir/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 368 def forward( self, inputs: Union[dict, list, torch.Tensor], ~~~~ <--- HERE output_names:List[str] = None, hooks: Dict[str, RuntimeHook] = None
The text was updated successfully, but these errors were encountered:
你玩的挺花啊...PPQ有自己的推理引擎,你为啥要导出成mlir呢...
Sorry, something went wrong.
No branches or pull requests
抛出了如下错误,该怎么解决呢?
Exception has occurred: RuntimeError
Unknown type name 'dict':
File "/home/congcong.zhang/.miniconda3/envs/torch-mlir/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 368
def forward(
self,
inputs: Union[dict, list, torch.Tensor],
~~~~ <--- HERE
output_names:List[str] = None,
hooks: Dict[str, RuntimeHook] = None
File "/home/congcong.zhang/workspace/code/ppq/ppq/samples/test_resnet18.py", line 30, in export_mlir
module = torchscript.compile(model, dummy_input, output_type="tosa")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/congcong.zhang/workspace/code/ppq/ppq/samples/test_resnet18.py", line 246, in
export_mlir(
RuntimeError:
Unknown type name 'dict':
File "/home/congcong.zhang/.miniconda3/envs/torch-mlir/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 368
def forward(
self,
inputs: Union[dict, list, torch.Tensor],
~~~~ <--- HERE
output_names:List[str] = None,
hooks: Dict[str, RuntimeHook] = None
The text was updated successfully, but these errors were encountered: