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
Describe the bug
I use torch_tensorrt.compile to compile my vqgan model which contains einops ops. Since the torch.jit.ScriptModule does not allow arbitrary args specification **kwargs, I use from einops.layers.torch import Rearrange to create layers instead. However, it still throw the following error.
Traceback (most recent call last):
File "/xxx/convert_trt.py", line 102, in main
trt_model = torch_tensorrt.compile(
File "/usr/local/lib/python3.10/dist-packages/torch_tensorrt/_compile.py", line 212, in compile
compiled_ts_module: torch.jit.ScriptModule = torchscript_compile(
File "/usr/local/lib/python3.10/dist-packages/torch_tensorrt/ts/_compiler.py", line 154, in compile
compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))
RuntimeError: Unknown type Dict[int, __torch__.einops.einops.TransformRecipe] encountered in graph lowering. This type is not supported in ONNX export.
Thanks! But for now, is there a workround to make it work?
once again - ask pytorch_tensorrt. I never seen or used it, I don't know why their compilation process does not respect torch's compile registration, etc.
Describe the bug
I use torch_tensorrt.compile to compile my vqgan model which contains einops ops. Since the torch.jit.ScriptModule does not allow arbitrary args specification
**kwargs
, I usefrom einops.layers.torch import Rearrange
to create layers instead. However, it still throw the following error.I've tried to set:
But it didn't work.
The text was updated successfully, but these errors were encountered: