Automotive Performance Metrics · Runtime metric
Inference Latency
Also known as model latency, inference time, forward-pass latency, GPU compute time, host latency
Inference latency is the time a model takes to turn one input into its output, from when the input is presented to the runtime until the result is available. It must be reported with its measurement boundary, statistic and hardware conditions.
Explanation
Tools draw the boundary differently. TensorRT's trtexec separates GPU compute time (kernel execution only) from host latency, which adds host-to-device and device-to-host transfers, and reports enqueue time separately; pre- and post-processing are excluded unless timed on their own. MLPerf Inference measures from when its load generator issues a query to when the system returns the response, and counts most pre- and post-processing, such as non-maximum suppression, as timed.
Latency varies from run to run, so a mean alone hides problems. Report the median, tail percentiles (p90, p95, p99) and the maximum, with warm-up excluded. MLPerf's single-stream scenario reports a 90th-percentile value; a function with a hard timing budget needs the worst case or a very high percentile.
Results depend on GPU clock behaviour, power and thermal limits, batch size, precision, concurrent workloads and synchronisation mode. Values are only comparable when model, input size, precision, hardware, software versions, clock settings and measurement boundary all match.
How it works
Run warm-up iterations so that lazy initialisation and clock ramp-up are excluded; trtexec defaults to at least 200 ms. Then time many single-input runs with a synchronised timer, using CUDA events for device-only time or a host wall clock around the whole call. Record every sample, compute percentiles, and log clocks, temperature and power so outliers can be explained.
Automotive applications
- Checking a network fits its per-frame budget
- Comparing FP32, FP16 and INT8 builds
- Selecting hardware for an ECU
- Regression tests for model releases
Example
A detector has a median GPU compute time of 6.1 ms, but host latency including transfers has a p99 of 9.8 ms against a 10 ms stage budget. The team considers the margin too small and moves preprocessing onto the GPU to reduce transfers.
An illustrative example: any figures in it are worked numbers, not measurements.
References
Definitions are original summaries. Standards text is not reproduced; follow the links for the official publications.