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
Copy file name to clipboardExpand all lines: py/torch_tensorrt/dynamo/_compiler.py
+5-33Lines changed: 5 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -444,6 +444,9 @@ def compile(
444
444
autocast_max_depth_of_reduction: Optional[
445
445
int
446
446
] =_defaults.AUTOCAST_MAX_DEPTH_OF_REDUCTION,
447
+
autocast_calibration_dataloader: Optional[
448
+
torch.utils.data.DataLoader
449
+
] =_defaults.AUTOCAST_CALIBRATION_DATALOADER,
447
450
**kwargs: Any,
448
451
) ->torch.fx.GraphModule:
449
452
"""Compile an ExportedProgram module for NVIDIA GPUs using TensorRT
@@ -527,6 +530,7 @@ def compile(
527
530
autocast_excluded_ops (Collection[Target]): The set of targets (ATen ops) that should remain in FP32. Default is [].
528
531
autocast_data_max (float): Maximum absolute value for node outputs, nodes with outputs greater than this value will remain in FP32. Default is 512.
529
532
autocast_max_depth_of_reduction (Optional[int]): Maximum depth of reduction allowed in low precision. Nodes with higher reduction depths will remain in FP32. If not provided, infinity will be used. Default is None.
533
+
autocast_calibration_dataloader (Optional[torch.utils.data.DataLoader]): The dataloader to use for autocast calibration. Default is None.
530
534
**kwargs: Any,
531
535
Returns:
532
536
torch.fx.GraphModule: Compiled FX Module, when run it will execute via TensorRT
autocast_excluded_ops (Collection[Target]): The set of targets (ATen ops) that should remain in FP32. Default is [].
111
112
autocast_data_max (float): Maximum absolute value for node outputs, nodes with outputs greater than this value will remain in FP32. Default is 512.
112
113
autocast_max_depth_of_reduction (Optional[int]): Maximum depth of reduction allowed in low precision. Nodes with higher reduction depths will remain in FP32. If not provided, infinity will be used. Default is None.
113
-
autocast_intermediate_node_outputs (dict[str, torch.Tensor]): The intermediate node outputs of the graph. Default is {}.
114
+
autocast_calibration_dataloader (Optional[torch.utils.data.DataLoader]): The dataloader to use for autocast calibration. Default is None.
0 commit comments