Skip to content

Commit aa2f917

Browse files
GdoongMathewlanluo-nvidia
authored andcommitted
fix: fix export in torchscript format.
1 parent ea42f58 commit aa2f917

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
@@ -660,7 +660,7 @@ def save(
660660
"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."
661661
)
662662
elif module_type == _ModuleType.ts:
663-
if not all([output_format == f for f in ["exported_program", "aot_inductor"]]):
663+
if output_format != "torchscript":
664664
raise ValueError(
665665
"Provided model is a torch.jit.ScriptModule but the output_format specified is not torchscript. Other output formats are not supported"
666666
)

0 commit comments

Comments
 (0)