TensorRT 11.1全局性能调优器详解
NVIDIA Technical Blog 介绍了 TensorRT 11.1 中自动、兼顾精度的全局性能调优器的架构与使用最佳实践。该功能将替代性的编译调度策略表示为由编译器旋钮值组合而成的可搜索构建路由,并选择满足用户设定精度边界且实测速度最快的引擎。NVIDIA 建议在模型、输入形状、目标 GPU、软件栈或相关 TensorRT 版本发生变化后重新调优。
据 NVIDIA Technical Blog,该功能让 TensorRT 从依赖通用调度策略转向针对模型和部署环境选择路由,同时兼顾精度要求。
The Global Performance Tuner is a feature for automatic performance tuning released in NVIDIA TensorRT 11.1. It provides automatic, accuracy-aware and end-to-end performance tuning within TensorRT by customizing different optimizations for different models. For more details, see Part 1 of this series, which introduces the challenges associated with scheduling (a critical stage in deep learning compiler optimization), the motivation for developing the Global Performance Tuner feature in TensorRT, and the mathematical theories established to formalize the problem.
This post, Part 2, uses the notation from Part 1 to describe the algorithm and architectural design of the Global Performance Tuner feature. It also provides best practices for using it.
Designing the Global Performance Tuner feature in TensorRT
The central design idea of the Global Performance Tuner is to represent alternative scheduling strategies as explicit and searchable build routes. A compiler knob (also called a compiler flag or compiler option) is a configuration setting that changes some aspect of the compilation pipeline, such as a heuristic, fusion decision, or code generation path.
Each tunable knob exposes a finite set of allowed values and has a default value. A build route is a concrete combination of knob values. When no build route is specified, TensorRT uses the default build route, in which every knob retains its default value.