Optimizing for Low-Latency Communication in Inference Workloads with JAX and XLA
AI-generated summary of reporting by NVIDIA Developer Blog. Read the original for the full story.
Why it matters
NVIDIA shows a custom single-shot all-reduce JAX kernel cutting decode latency 27% on 8-way tensor-parallel Gemma2, a directly reusable technique for teams running multi-GPU LLM inference today.
NVIDIA engineers found that in multi-GPU AI inference, the step where small messages get combined across GPUs (called all-reduce) was a major slowdown. They replaced the usual 'ring' method, which passes data in many stages, with a one-step version where all GPUs exchange data at once over their direct connections. They also merged this with nearby math operations into one kernel, the basic unit of GPU work. The result was roughly 3x faster for that operation and 27% faster token generation on an 8-GPU Gemma2 model.
For teams running tensor-parallel LLM inference on NVIDIA hardware, this cuts end-to-end decode latency by about 27% and kernel time by 3x on an 8x H100 Gemma2 setup, using a custom kernel that works with JAX and CUDA Graphs. It's free performance for existing JAX/XLA users but requires writing custom CUDA code. NCCL 2.27's upcoming symmetric memory support may deliver up to 4x faster small-payload communication without custom kernels.
NVIDIA's XLA team replaced ring-based all-reduce (2N-2 stages, ~2x latency penalty at ~30 KB message sizes) with a single-shot all-reduce using bidirectional NVLink exchanges and cudaDeviceEnablePeerAccess to skip memory copies. The kernel fuses all-reduce with RMSNorm and pointwise add, registered via JAX FFI with the kCmdBufferCompatible trait for CUDA Graph compatibility. Results: ~3x kernel speedup, ~27% end-to-end decode latency improvement on 8-way tensor-parallel Gemma2, plus 5% from CUDA Graphs. All-reduce was ~23% of decode latency; NCCL 2.27 symmetric memory promises up to 4x faster small payloads.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Samsung is testing a feature that changes the angle of photos you’ve already taken
Samsung’s new Recompose lets users change photo angles after shooting, potentially reducing the need for multiple shots and improving post-capture editing workflows for photographers and casual users alike.
Frame generation on NVIDIA cards: DLSS on RTX 40/50, FSR 3 elsewhere
Enabling frame generation on non-RTX 40/50 GPUs lets gamers run console-build games at higher frame rates without buying new hardware.
Taking Trainium3 to the Track: Generating Videos with LTX-2.5
Video generation on AWS Trainium3 can now rival Lightricks' paid API in speed, giving teams a non-CUDA inference option, though only after heavy custom patching.
The Download: Better bionic hands and AI’s natural-gas boom
This newsletter roundup mostly relays other outlets' reporting; its two own stories flag sensory-linked prosthetics reaching home use and AI data centers locking the US grid into natural gas.
Introducing the llama.cpp benchmark dashboard for AMD Ryzen and Radeon
AMD developers running llama.cpp locally on Ryzen/Radeon GPUs can now compare prompt-processing and token-generation speeds across builds, models and quantizations on a public dashboard.