Skip to content

Commit e1c5416

Browse files
committedJun 11, 2020
fix(//cpp/ptq): Enable FP16 kernels for INT8 applications
Signed-off-by: Naren Dasan <naren@narendasan.com> Signed-off-by: Naren Dasan <narens@nvidia.com>
1 parent 6421f3d commit e1c5416

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎core/conversion/conversionctx/ConversionCtx.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ ConversionCtx::ConversionCtx(BuilderSettings build_settings)
5151
case nvinfer1::DataType::kINT8:
5252
TRTORCH_CHECK(builder->platformHasFastInt8(), "Requested inference in INT8 but platform does support INT8");
5353
cfg->setFlag(nvinfer1::BuilderFlag::kINT8);
54+
cfg->setFlag(nvinfer1::BuilderFlag::kFP16);
5455
input_type = nvinfer1::DataType::kFLOAT;
5556
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");
5657
cfg->setInt8Calibrator(settings.calibrator);

0 commit comments

Comments
 (0)
Please sign in to comment.