Skip to content

Add Google Cloud TPU to get_peak_flops#3900

Open
wconstab wants to merge 1 commit into
mainfrom
whc/tpu-peak-flops
Open

Add Google Cloud TPU to get_peak_flops#3900
wconstab wants to merge 1 commit into
mainfrom
whc/tpu-peak-flops

Conversation

@wconstab

Copy link
Copy Markdown
Contributor

In preparation for TPU enablement...

Values are dense BF16 MXU peak per device as the XLA/PJRT runtime exposes it: one TensorCore on v7, one chip on single-core/megacore generations. That is the per-rank granularity MFU divides by, so no per-core division is applied. Sources: cloud.google.com/tpu/docs.

get_peak_flops covers NVIDIA, AMD, Intel, and AWS accelerators but has no
TPU entry, so TPU runs hit the A100 fallback (312 TFLOPS) and report MFU
inflated by ~3.7x (e.g. TPU v7 peak is 1153.5 TFLOPS/device). This adds a
TPU section keyed on the device name reported by torch_tpu's
TpuDeviceModule.get_device_name() ("TPU v7", "TPU v5p", ...).

Values are dense BF16 MXU peak per device as the XLA/PJRT runtime exposes
it: one TensorCore on v7, one chip on single-core/megacore generations.
That is the per-rank granularity MFU divides by, so no per-core division is
applied. Sources: cloud.google.com/tpu/docs.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants