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
print("int8 precision expects calibration cache file for inference")
562
567
returnFalse
563
568
564
-
if (modelisNone) and (backendin ("tensorrt", "ts_trt", "all")):
569
+
if (modelisNone) and (backendin ("ts_trt", "all")):
565
570
warnings.warn(
566
571
f"Requested backend {backend} without specifying a TorchScript Model, "
567
572
+"skipping this backend"
@@ -585,7 +590,7 @@ def run(
585
590
batch_size,
586
591
)
587
592
run_tensorrt(
588
-
model,
593
+
model_torch,
589
594
input_tensors,
590
595
params,
591
596
precision,
@@ -606,7 +611,7 @@ def run(
606
611
)
607
612
elifbackend=="tensorrt":
608
613
run_tensorrt(
609
-
model,
614
+
model_torch,
610
615
input_tensors,
611
616
params,
612
617
precision,
@@ -641,6 +646,12 @@ def run(
641
646
default="",
642
647
help="Name of torch model file",
643
648
)
649
+
arg_parser.add_argument(
650
+
"--onnx",
651
+
type=str,
652
+
default="",
653
+
help="ONNX model file which helps bypass the step of exporting ONNX from torchscript model. If this argument is provided, the ONNX will be directly converted to TRT engine",
654
+
)
644
655
arg_parser.add_argument(
645
656
"--inputs",
646
657
type=str,
@@ -683,7 +694,7 @@ def run(
683
694
arg_parser.add_argument(
684
695
"--optimization_level",
685
696
type=int,
686
-
default=5,
697
+
default=3,
687
698
help="Builder optimization level for TensorRT",
688
699
)
689
700
arg_parser.add_argument(
@@ -767,7 +778,9 @@ def run(
767
778
)
768
779
769
780
backends=parse_backends(params["backends"])
770
-
if ("dynamo"inbackendsor"torch_compile"inbackends) and (model_torchisNone):
0 commit comments