Google 为 XProf 新增周期级内核性能分析
原标题:Google Adds Cycle-Level Kernel Profiling to XProf
AI 摘要
Google 为其开源 TPU 性能分析工具 XProf 新增了 Kernel Profiling 套件,使开发者能够查看自定义 Pallas 内核的周期级细节,而此前这些内核在 trace 中只是不透明的块。该套件提供编译器检查、Trace Viewer 的 LLO 数据以及硬件计数器采样三种层级,并支持外部事件触发实现亚微秒级捕获。在 tiled matmul 示例中,Google 通过三重缓冲将内核时间从 125.5µs 降至 88µs(约 30%),但强调这仅来自单个演示内核而非广泛基准。
正文节选
Google has added a Kernel Profiling suite to XProf. This is its open-source profiler for TPU workloads. Now, developers can see cycle-level details in custom Pallas kernels. Before, these kernels appeared as single opaque blocks in trace captures. On TPU v7 (Ironwood), XProf samples hardware performance counters during runtime. In a tiled matmul example, Google found a memory stall. They cut kernel time from 125.5µs to 88µs, about 30%, by adding triple buffering. According to Yogesh SY of Google