I have a counterexample on TPU v7x. In a matmul kernel, issuing matmuls in bursts triggers power-management throttling, which in turn stalls weight delivery. Spacing out the matmuls yields a 25.9% speedup over an issue-when-ready greedy scheduler and 26.4% over vanilla Pallas.
Anyone who worked with wide instruction bundles / static scheduling on TPU, Hexagon, or AMD AI Engine — curious how close a greedy scheduler gets to optimal on your machines.
I measured this on Elbrus (classic VLIW). Greedy is already optimal in 94% of cases, 0.51% cycle loss. Small neural net recovers most of the rest and never makes it worse.
CLI that shows greedy vs exact optimum vs model on any .s file:
github.com/smworklair/NEX-CL…
@PatrickToulme @NormJouppi @adityazero_ @AminVahdat @JeffDean @Qualcomm @QCOMResearch @AMDembedded
You know your implementation of SC prefetching into TC IMEM is getting a bit too advanced when Opus 5.5's safeguards flag it as a cyberattack and stop the response
1
21
2,229
Speaking of TPU performance optimization, we all know by now that it's all about spinning up agent swarms and working at lower levels. It's just a matter of how determined we are to keep token-maxxing down there before our agents give up and fall back to vanilla Pallas.
If you really want to boost your TPU performance, keep in mind that data isn't fetched immediately after a DMA is issued, which means that on TPU v7x you can technically issue your output DMA about 280 cycles before the data is ready.
5
79
4,858
Pallas TPU's top-k implementation keeps a known bug because the fix was deemed expensive, but I made it bitwise correct and faster.
doi.org/10.5281/zenodo.23287…
Love how folks from some mysterious orgs casually start a Pallas TPU bug report with "tested on TPU 7x" while those of us living off TRC are still treasuring our TPU v4 quota
A large part of what I've done with Codex recently boils down to me saying, "Fixing this ourselves by patching the binary is way faster than waiting for Google to fix it internally. Go do it," and then going to grab a cup of coffee.
Today I rewrote my own XProf implementation in Rust using Codex. For a profile with 380K events, load time dropped from 12.6s to 7.2s, search latency improved from 502ms to 400ms, and a 291 MB XPlane that previously crashed now works.
1
19
994
Some updates on my TPU v4 BarnaCore compiler: it now automatically manages full-program control flow and incorporates a hardware-validated scoreboard. For the UTF transcoder, this reduced the device program from 128 to 96 bundles, with almost no manual bundle scheduling required.
1
15
759
Today I recreated the TPU Topology Visualizer and open-sourced it on GitHub:
ayaka14732.github.io/tpu-top…
3
21
772
Shape checks, sharding checks, reshape, rearrange, reshard, and einsum contractions, now all in one operation!
github.com/ayaka14732/einopx
Introducing the world’s first user-defined TPU v4 BarnaCore program, compiled with the world’s first user-facing TPU v4 BarnaCore compiler.
It’s a UTF-16LE to UTF-8 transcoder, written in a custom-designed assembly format.
Transcoding is obviously not what BarnaCore is meant for. However, this demonstrates that BarnaCore programming is now possible without official support.
Source code: gist.github.com/ayaka14732/c…
25 days ago, Codex and I patched libtpu.so to enable Pallas kernels to use CMEM on TPU v4.
Here’s the detailed write-up: medium.com/@ayaka_45434/addi…
1
25
2,605
Today, Codex and I discovered that Pallas inserts a redundant Megacore entry barrier on TPU v4, and we patched libtpu.so to remove it.
medium.com/@ayaka_45434/remo…
(1/2) Yesterday, a JAX team member called Pallas support for TPU v4 BarnaCore "pretty low probability" because "v4 is several generations old", even though TPU v4 is the highest-generation TPU that external users can reliably access via the TPU Research Cloud.
Today, Codex and I successfully patched a TPU v4 executable, fixing incorrect results caused by an internal bug in the Pallas compiler.
I've been using my `use-tpu-vm-experiment` agent skill to set up the environment and launch experiments on spot TPU VMs as quickly as possible.
1
829
Labs that use TPUs might already have reverse-engineered source code for the latest version of libtpu that they use to debug Pallas kernels and never intend to release
The labs almost certainly have internal forks of pytorch, GPU kernels, Jax, numpy, etc that they optimise and never intend to release
10
942









