Skip to content

Commit

Permalink
fix(//cpp/ptq): Enable FP16 kernels for INT8 applications
Browse files Browse the repository at this point in the history
Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
  • Loading branch information
narendasan committed Jun 11, 2020
1 parent 6421f3d commit e1c5416
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/conversion/conversionctx/ConversionCtx.cpp
Expand Up @@ -51,6 +51,7 @@ ConversionCtx::ConversionCtx(BuilderSettings build_settings)
case nvinfer1::DataType::kINT8:
TRTORCH_CHECK(builder->platformHasFastInt8(), "Requested inference in INT8 but platform does support INT8");
cfg->setFlag(nvinfer1::BuilderFlag::kINT8);
cfg->setFlag(nvinfer1::BuilderFlag::kFP16);
input_type = nvinfer1::DataType::kFLOAT;
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");
cfg->setInt8Calibrator(settings.calibrator);
Expand Down

0 comments on commit e1c5416

Please sign in to comment.