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

Function printLayerInfo

samples/common/sampleReporting.cpp:490–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488 std::string const& fileName, int32_t batch);
489
490bool printLayerInfo(
491 ReportingOptions const& reporting, nvinfer1::ICudaEngine* engine, nvinfer1::IExecutionContext* context)
492{
493 if (reporting.layerInfo)
494 {
495 sample::gLogInfo << "Layer Information:" << std::endl;
496 sample::gLogInfo << getLayerInformation(engine, context, nvinfer1::LayerInformationFormat::kONELINE)
497 << std::flush;
498 }
499 if (!reporting.exportLayerInfo.empty())
500 {
501 std::ofstream os(reporting.exportLayerInfo, std::ofstream::trunc);
502 os << getLayerInformation(engine, context, nvinfer1::LayerInformationFormat::kJSON) << std::flush;
503 }
504 return true;
505}
506
507void printPerformanceProfile(ReportingOptions const& reporting, InferenceEnvironment& iEnv)
508{

Callers 1

mainFunction · 0.85

Calls 2

getLayerInformationFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected