What problem does it solve?
This Skill profiles and optimizes TensorRT-LLM host-side CPU overhead so inference throughput improves when the GPU is underutilized or when PyExecutor request handling becomes a bottleneck.
Core Features & Use Cases
- Line-by-line host profiling with line_profiler: Uses TLLM_LINE_PROFILER_* environment variables to capture hotspots in PyTorch backend functions.
- Bottleneck confirmation and targeted drill-down: Leverages perf-host-analysis results to prioritize likely functions (including NVTX-root-cause guided mapping) and forces deeper profiling when a line dominates (>80%) via drill-down targets.
- Iterative profile-analyze-optimize-validate loop: Runs multiple rounds to apply low-risk optimizations first, mandates unit-test validation after each change, and re-profiles to verify both hotspot time and end-to-end benchmark metrics.
- Host-aware tuning: Includes guidance on CPU affinity consistency (NUMA pinning) and workspace suffix conventions to keep iterative experiments comparable.
Quick Start
Run the profiling and optimization loop to reduce CPU bottlenecks in TensorRT-LLM host inference by enabling TLLM_LINE_PROFILER_ENABLED and setting TLLM_LINE_PROFILER_FUNCTIONS to the function you suspect is limiting throughput, such as tensorrt_llm._torch.pyexecutor.model_engine.PyTorchModelEngine._prepare_tp_inputs.