XLA, From the Inside

Every JAX and PyTorch/XLA program ends up here: a StableHLO module handed across PJRT, rewritten by about two hundred passes, fused, laid out, assigned to buffers, split across devices, and turned into kernels and a schedule of thunks. The track starts with a dump you can read tonight and ends at the runtime that executes it.

Phase 1 — Read a dump first

One flag writes every stage of the compile to disk. Learn the file names before the passes that produced them.

Phase 2 — The front door

How a framework loads a backend as a plugin, and how a StableHLO module becomes the HLO the rest of the compiler consumes.

Phase 3 — HLO and the pipeline

The data structure every pass rewrites, and the runner that walks about two hundred of them in order.

Phase 4 — Fusion, layout, and memory

The three decisions that decide the speed of the program, each one read from the pass that makes it.

Phase 5 — Many devices

One annotated program becomes N per-device programs, and the collectives between them are inserted by a pass.

Phase 6 — Backends and the runtime

What the compiled module becomes on a CPU and on a GPU, and the executor that runs the schedule.

Phase 7 — Above the compiler

IFRT wraps per-device buffers into one array so a controller can drive thousands of devices; Pathways is what that buys.

Browse the full library