Collect per-layer profile information, assuming times are reported in the same order. More...
Public Member Functions | |
void | reportLayerTime (const char *layerName, float timeMs) override |
Layer time reporting callback. More... | |
void | print (std::ostream &os) const |
void | exportJSONProfile (const std::string &fileName) const |
Export a profile to JSON file. More... | |
Private Member Functions | |
float | getTotalTime () const |
Private Attributes | |
std::vector< LayerProfile > | mLayers |
std::vector< LayerProfile >::iterator | mIterator {mLayers.begin()} |
int | mUpdatesCount {0} |
Collect per-layer profile information, assuming times are reported in the same order.
|
overridevirtual |
Layer time reporting callback.
layerName | The name of the layer, set when constructing the network definition. |
ms | The time in milliseconds to execute the layer. |
Implements nvinfer1::IProfiler.
void sample::Profiler::print | ( | std::ostream & | os | ) | const |
void sample::Profiler::exportJSONProfile | ( | const std::string & | fileName | ) | const |
Export a profile to JSON file.
|
inlineprivate |
|
private |
|
private |
|
private |