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

Class InferenceTime

samples/common/sampleReporting.h:41–68  ·  view source on GitHub ↗

\struct InferenceTime \brief Measurement times in milliseconds

Source from the content-addressed store, hash-verified

39//! \brief Measurement times in milliseconds
40//!
41struct InferenceTime
42{
43 InferenceTime(float q, float i, float c, float o)
44 : enq(q)
45 , h2d(i)
46 , compute(c)
47 , d2h(o)
48 {
49 }
50
51 InferenceTime() = default;
52 InferenceTime(InferenceTime const&) = default;
53 InferenceTime(InferenceTime&&) = default;
54 InferenceTime& operator=(InferenceTime const&) = default;
55 InferenceTime& operator=(InferenceTime&&) = default;
56 ~InferenceTime() = default;
57
58 float enq{0}; // Enqueue
59 float h2d{0}; // Host to Device
60 float compute{0}; // Compute
61 float d2h{0}; // Device to Host
62
63 // ideal latency
64 float latency() const
65 {
66 return h2d + compute + d2h;
67 }
68};
69
70//!
71//! \struct InferenceTrace

Callers 2

operator+Function · 0.85
traceToTimingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected