Skip to content

Commit b9d6a4c

Browse files
authored
fix: fix export in torchscript format.
1 parent 2414b0f commit b9d6a4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/torch_tensorrt/_compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def save(
639639
"Input model is of type nn.Module. Saving nn.Module directly is not supported. Supported model types torch.jit.ScriptModule | torch.fx.GraphModule | torch.export.ExportedProgram."
640640
)
641641
elif module_type == _ModuleType.ts:
642-
if not all([output_format == f for f in ["exported_program", "aot_inductor"]]):
642+
if output_format != "torchscript":
643643
raise ValueError(
644644
"Provided model is a torch.jit.ScriptModule but the output_format specified is not torchscript. Other output formats are not supported"
645645
)

0 commit comments

Comments
 (0)