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
| backend | all, torch, torch_tensorrt, tensorrt | Supported backends for inference. |
69
+
| backend | all, torchscript, fx2trt, torch, torch_tensorrt, tensorrt | Supported backends for inference. "all" implies the last four methods in the list at left, and "torchscript" implies the last three (excludes fx path)|
70
70
| input | - | Input binding names. Expected to list shapes of each input bindings |
71
71
| model | - | Configure the model filename and name |
72
+
| model_torch | - | Name of torch model file and name (used for fx2trt) (optional) |
72
73
| filename | - | Model file name to load from disk. |
73
74
| name | - | Model name |
74
75
| runtime | - | Runtime configurations |
@@ -83,6 +84,7 @@ backend:
83
84
- torch
84
85
- torch_tensorrt
85
86
- tensorrt
87
+
- fx2trt
86
88
input:
87
89
input0:
88
90
- 3
@@ -92,6 +94,9 @@ input:
92
94
model:
93
95
filename: model.plan
94
96
name: vgg16
97
+
model_torch:
98
+
filename: model_torch.pt
99
+
name: vgg16
95
100
runtime:
96
101
device: 0
97
102
precision:
@@ -108,8 +113,9 @@ Note:
108
113
109
114
Here are the list of `CompileSpec` options that can be provided directly to compile the pytorch module
110
115
111
-
*`--backends` : Comma separated string of backends. Eg: torch,torch_tensorrt,tensorrt or fx2trt
116
+
*`--backends` : Comma separated string of backends. Eg: torch,torch_tensorrt,tensorrt,fx2trt
112
117
*`--model` : Name of the model file (Can be a torchscript module or a tensorrt engine (ending in `.plan` extension)). If the backend is `fx2trt`, the input should be a Pytorch module (instead of a torchscript module) and the options for model are (`vgg16` | `resnet50` | `efficientnet_b0`)
118
+
*`--model_torch` : Name of the PyTorch model file (optional, only necessary if fx2trt is a chosen backend)
113
119
*`--inputs` : List of input shapes & dtypes. Eg: (1, 3, 224, 224)@fp32 for Resnet or (1, 128)@int32;(1, 128)@int32 for BERT
114
120
*`--batch_size` : Batch size
115
121
*`--precision` : Comma separated list of precisions to build TensorRT engine Eg: fp32,fp16
0 commit comments