← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

Google XProf Adds Cycle-Level Kernel Profiling for TPU Workloads

🔄 Updated 15h ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • XProf now provides cycle-level details for custom Pallas kernels.
  • New profiling suite samples hardware performance counters on TPU v7.
  • Enabled 30% kernel time reduction in a matmul example.
  • Addresses inaccuracies in static cost models for custom compilation paths.

XProf Enhances TPU Profiling Capabilities

Google has introduced a Kernel Profiling suite to XProf, its open-source profiler designed for TPU workloads. This addition allows developers to gain cycle-level insights into custom Pallas kernels, which previously appeared as opaque blocks in trace captures. The new functionality is particularly relevant for TPU v7 (Ironwood), where XProf samples hardware performance counters during runtime.

Addressing Static Analysis Limitations

According to Yogesh SY of Google's AI Infra team, custom compilation paths used by kernels developed with Pallas, Mosaic, or Triton bypass standard XLA passes. This can lead to distortions in compile-time static cost models, making metrics like "optimal FLOPs" and goodput efficiency inaccurate. The new profiling suite aims to provide a more accurate view of actual runtime performance, as static analysis can incorrectly flag units as utilized when they are idle, waiting on HBM.

Multi-Level Inspection and Telemetry

The suite operates at three levels. Developers can enable compiler inspection flags to view a "Custom Call Text" panel in the Graph Viewer, which displays the lowered MLIR for each custom call. This allows engineers to verify operation fusion and memory tile structuring. The Trace Viewer provides Low-Level Operations (LLO) bundle data for static execution analysis, including machine instructions per clock cycle and time-aligned tracks for various processing units.

For runtime telemetry, XProf periodically samples hardware counters with a 1µs resolution floor. A new external event-triggered mode removes this floor by capturing TPU trace instructions and boundary triggers, such as custom call entry and exit, enabling sub-microsecond capture and improved attribution. Developers can configure up to 28 counters per core across up to four SparseCores.

Practical Application and Optimization

In a case study involving a tiled matmul, Google identified a memory stall using the new profiling tools. By implementing triple buffering, they reduced the kernel time from 125.5µs to 88µs, representing approximately a 30% improvement. The memory-bound variant showed large spikes in sync_wait counters, which were mitigated by overlapping HBM loads with MXU compute through triple buffering.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~26 min · 21 stories · Sep 23

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Primary sources

GitHub openxla/xprof

Reporting from

Google has integrated a Kernel Profiling suite into XProf, its open-source profiler for TPU workloads, allowing developers to inspect cycle-level details within custom Pallas kernels. This enhancement addresses inaccuracies in static cost models for custom compilation paths and enables more precise optimization of TPU performance. For example, Google used it to reduce kernel time by 30% in a tiled matmul example by identifying and resolving a memory stall.