Commit e9731c3a authored by xin.wang.waytous's avatar xin.wang.waytous

int8-support-

parent a4fe9ff5
......@@ -190,8 +190,11 @@ bool TRTInference::BuildEngine(YAML::Node& configNode){
configNode["inputWidth"].as<int>(), configNode["inputHeight"].as<int>(),
inputMean, inputStd, configNode["useBGR"].as<bool>(), configNode["fixAspectRatio"].as<bool>()
);
// builder->setInt8Calibrator(calibrator);
#ifdef TRT_8
builderConfig->setInt8Calibrator(calibrator);
#else
builder->setInt8Calibrator(calibrator);
#endif
}
else{
LOG_ERROR << "Not imgs for calib int8. " << configNode["calibImgPathFile"].as<std::string>();
......
......@@ -372,7 +372,11 @@ bool YoloV5TRTInference::BuildEngine(YAML::Node& configNode){
configNode["calibTableCache"].as<std::string>(),
maxBatchSize, inputWidth, inputHeight, inputMean, inputStd,
configNode["useBGR"].as<bool>(), configNode["fixAspectRatio"].as<bool>());
#ifdef TRT_8
config->setInt8Calibrator(calibrator);
#else
builder->setInt8Calibrator(calibrator);
#endif
// */
// return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment