MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / readCalibrationCache

Method readCalibrationCache

samples/common/sampleEngines.cpp:444–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444const void* RndInt8Calibrator::readCalibrationCache(size_t& length) noexcept
445{
446 mCalibrationCache.clear();
447 std::ifstream input(mCacheFile, std::ios::binary);
448 input >> std::noskipws;
449 if (input.good())
450 {
451 std::copy(
452 std::istream_iterator<char>(input), std::istream_iterator<char>(), std::back_inserter(mCalibrationCache));
453 }
454
455 length = mCalibrationCache.size();
456 return !mCalibrationCache.empty() ? mCalibrationCache.data() : nullptr;
457}
458
459bool setTensorDynamicRange(INetworkDefinition const& network, float inRange = 2.0F, float outRange = 4.0F)
460{

Callers

nothing calls this directly

Calls 4

clearMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected