File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/lightning/pytorch/core Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1494,12 +1494,12 @@ def forward(self, x):
1494
1494
@torch .no_grad ()
1495
1495
def to_tensorrt (
1496
1496
self ,
1497
- file_path : str | Path | BytesIO | None = None ,
1498
- input_sample : Any | None = None ,
1497
+ file_path : Optional [ Union [ str , Path , BytesIO ]] = None ,
1498
+ input_sample : Optional [ Any ] = None ,
1499
1499
ir : Literal ["default" , "dynamo" , "ts" ] = "default" ,
1500
1500
output_format : Literal ["exported_program" , "torchscript" ] = "exported_program" ,
1501
1501
retrace : bool = False ,
1502
- default_device : str | torch .device = "cuda" ,
1502
+ default_device : Union [ str , torch .device ] = "cuda" ,
1503
1503
** compile_kwargs : Any ,
1504
1504
) -> Union [ScriptModule , torch .fx .GraphModule ]:
1505
1505
"""Export the model to ScriptModule or GraphModule using TensorRT compile backend.
You can’t perform that action at this time.
0 commit comments