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
TRTORCH_CHECK(builder->platformHasFastFp16(), "Requested inference in FP16 but platform does support FP16");
39
48
cfg->setFlag(nvinfer1::BuilderFlag::kFP16);
40
49
input_type = nvinfer1::DataType::kHALF;
41
50
break;
42
-
// case nvinfer1::DataType::kINT8:
43
-
// cfg->setFlag(nvinfer1::BuilderFlag::kINT8);
44
-
// input_type = nvinfer1::DataType::kFLOAT;
45
-
// break;
51
+
case nvinfer1::DataType::kINT8:
52
+
TRTORCH_CHECK(builder->platformHasFastInt8(), "Requested inference in INT8 but platform does support INT8");
53
+
cfg->setFlag(nvinfer1::BuilderFlag::kINT8);
54
+
input_type = nvinfer1::DataType::kFLOAT;
55
+
TRTORCH_CHECK(settings.calibrator != nullptr, "Requested inference in INT8 but no calibrator provided, set the ptq_calibrator field in the ExtraInfo struct with your calibrator");
Copy file name to clipboardExpand all lines: core/conversion/converters/impl/batch_norm.cpp
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,8 @@ volatile auto batch_norm_registrations = RegisterNodeConversionPatterns()
83
83
auto gamma = args[1].unwrapToTensor();
84
84
85
85
if (/*training*/ args[5].unwrapToBool()) {
86
-
LOG_WARNING("TensorRT only converts forward pass of graphs, but saw training = True, may see undefined behavior, consider placing module in eval mode");
86
+
LOG_WARNING(R"WARN(TRTorch only converts forward pass of graphs, but saw training = True, may see
87
+
unexpected behavior, consider placing module in eval mode before exporting the TorchScript module)WARN");
0 commit comments