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

Function dumpRefittable

samples/common/sampleEngines.cpp:1346–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1344}
1345
1346void dumpRefittable(nvinfer1::ICudaEngine& engine)
1347{
1348 std::unique_ptr<IRefitter> refitter{createRefitter(engine)};
1349 if (refitter == nullptr)
1350 {
1351 sample::gLogError << "Failed to create a refitter." << std::endl;
1352 return;
1353 }
1354
1355 auto const& layerWeightsRolePair = getLayerWeightsRolePair(*refitter);
1356 auto const& layerNames = layerWeightsRolePair.first;
1357 auto const& weightsRoles = layerWeightsRolePair.second;
1358 auto const nbAll = layerWeightsRolePair.first.size();
1359 for (size_t i = 0; i < nbAll; ++i)
1360 {
1361 sample::gLogInfo << layerNames[i] << " " << weightsRoles[i] << std::endl;
1362 }
1363}
1364
1365ICudaEngine* loadEngine(std::string const& engine, int32_t DLACore, std::ostream& err)
1366{

Callers 1

mainFunction · 0.85

Calls 3

getLayerWeightsRolePairFunction · 0.85
createRefitterFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected