AI Engineer World's Fair 2026
Can LLMs Write Fast Multi-GPU Kernels? — Simran Arora, Together AI
Read the talk
Can LLMs Write Fast Multi-GPU Kernels?
Simran Arora explains the transfer and scheduling decisions behind ParallelKittens, then shows where models succeed—and where they stall—on 87 practical multi-GPU kernel problems.
From a talk by Simran Arora
At a glance
Ideas worth remembering
Communication deserves explicit optimization: the reported A100-to-B200 gains are 7.2× for BF16 compute, 3× for intra-node communication, and 2× for inter-node communication, while most evaluated simple baselines remain below half their communication-aware roofline.
Fast multi-GPU kernels require matching transfer mechanisms and schedules to message size, resource use, data alignment, and in-network computation. ParallelKittens makes these choices easier to express without eliminating them.
Correctness and performance are separate outcomes. The best zero-shot result is 28 correct solutions out of 87, with 22 faster than the reference; more samples reach 36 correct solutions while the correct-and-faster share plateaus near 31%.
An agent environment improves results but does not resolve the underlying design difficulties. Gemini 3 Pro reaches 35 solved problems and 26 faster solutions, while ordering, partitioning, scheduling, and transfer selection remain central challenges.
Limited benchmark coverage can coexist with useful new kernels. Arora’s NeMo, Hyena, and SAM 3 examples show practical promise, while her conclusion leaves reliable reasoning about multi-GPU tradeoffs as an open problem.
The bottleneck moves between GPUs
Simran Arora’s frontier performance research team at Together AI develops systems, frameworks, and algorithms to extract more performance from AI hardware. Her starting point is a shift in what limits GPU utilization: improvements in single-GPU kernels and memory access have made communication between GPUs increasingly consequential.
FlashAttention, memory-efficient architectures, sparse attention, and better domain-specific languages have helped improve work within individual GPUs. The next question is how to write efficient kernels spanning multiple GPUs without making development prohibitively difficult. Arora approaches that question in two stages: identify the fundamental design decisions, then test whether frontier models can apply them to generate kernels.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Memory distance and the interconnect hierarchy
Arora grounds kernel design in the H100’s hardware organization. Threads execute on processors, with threads and blocks scheduled as groups. Those processors obtain weights and activations through a memory hierarchy that includes L2 cache and high-bandwidth memory. The GPU memory capacity exposed by system tools refers to that larger high-bandwidth memory, rather than the small storage closest to computation.
Registers sit close to the compute units and supply data very quickly; Arora cites 130 terabytes per second on an H100. Their capacity is limited. Moving farther from computation generally provides more storage but takes longer to reach it. This capacity-versus-access-speed tradeoff explains why moving data is central to kernel performance even before a second GPU enters the picture.
Multiple GPUs extend that hierarchy through several interconnects. PCIe supports CPU–GPU communication, while communication across nodes can use InfiniBand or TCP. Within the NVIDIA systems discussed here, NVLink provides point-to-point connections between GPUs and NVSwitch. NVSwitch joins NVLink endpoints into a nonblocking fabric and can accelerate communication operations such as multicast and reductions inside the network itself.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Why networking matters now
Several layers of optimization have advanced together: architectures reduce compute and memory requirements, hardware-aware algorithms improve execution, programming tools make kernels easier to express, and megakernels overlap work across operators. Yet larger distributed training and inference workloads still need to exchange data. Arora reports that communication increasingly consumes most of the runtime in many production workloads, leaving low model FLOP utilization at scale.
Networking also varies substantially across hardware vendors. Arora contrasts AMD’s XGMI point-to-point links, a TPU topology using a 3D torus with optical wraparound links, and NVIDIA’s switch fabric with in-network reductions. She cites NVLink bandwidth of up to 900 gigabytes per second in one direction between remote GPUs’ high-bandwidth memories on a particular hardware generation. The generation qualification matters: the talk presents this as a hardware-specific capability, not a universal NVLink rate.
Workloads are changing to use these systems in more varied ways. KV-cache storage can span GPU memory, CPU memory, disk, and remote machines. Inference can place speculative decoding, decode, and prefill on different hardware. Arora describes scale-up domains reaching 72 GPUs and cites NVIDIA’s plan for a 576-GPU system in 2027. Alongside these larger domains, tensor memory acceleration provides device-initiated asynchronous network transfers. Together, these changes create opportunities to redesign both the model and the system around how data moves.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
The gap between convenient collectives and peak performance
The hardware trend makes communication harder to hide. Comparing NVIDIA’s A100 in 2020 with the B200 in 2024, Arora reports a 7.2× improvement in BF16 tensor-core speed, versus 3× for intra-node communication and 2× for inter-node communication. Networking therefore gains less capacity relative to compute. Its substantial variation across vendors also complicates the task of building reusable abstractions.
Libraries such as NCCL make multi-GPU programming accessible, but Arora describes their bulk-transfer design as a poor fit for some fine-grained communication and fused collectives. Large, contiguous transfers are a different requirement from tightly coordinating small pieces of communication with computation. In the team’s benchmark, most simple PyTorch plus NCCL baselines fall below 50% of their communication-aware roofline bound, indicating substantial headroom even after accounting for communication limits.
Higher-level systems can retain the same limitation when they orchestrate bulk collectives and synchronize before and after transfers. Compilers and distributed DSLs offer another approach, but tuning may not transfer efficiently between architectures. Arora cites the team’s results for Triton Distributed, originally tuned around eight H800 GPUs, as an example of difficulty adapting to H100s.
Hand-tuning individual operators can achieve peak performance, but it makes each new variant expensive. Arora notes that adapting some implementations from one precision to another can take five or six months. The engineering problem is therefore to retain the control needed for high performance while reducing the repeated work required for each operator, precision, and hardware configuration.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Finding a small set of reusable decisions
ParallelKittens begins with a research question: does a small set of principles govern effective multi-GPU kernels? The team first investigated that question manually, building minimal primitives and patterns and using them to write kernels across multiple parallelism schemes. This supplied both an implementation approach and an understanding of the tradeoffs.
The next question was whether models could apply those principles when given them in context. That tests more than familiarity with kernel syntax: a model must use the tradeoffs to design a new multi-GPU implementation. Arora previews a disappointing result, then explains the decisions that the models would need to make.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Choosing how to transfer data
The first decision is the transfer mechanism. A GPU’s copy engine handles host-initiated transfers and works well for large messages, where it can approach peak communication bandwidth. It also leaves the GPU’s compute processors and registers available for other work. That makes bulk movement attractive when it can be organized separately from computation.
Device-initiated transfers instead use the tensor memory accelerator, or TMA, or register-level instructions. These approaches can saturate NVLink with relatively small messages, which suits fine-grained communication. TMA consumes few registers and can achieve high utilization with few processors, making it useful for overlapping transfers with computation without committing much of the GPU to communication.
TMA has a limitation in the design space Arora describes: it cannot effectively exploit the in-network computations available through NVSwitch. Register-level instructions can take advantage of those reductions. Choosing a transfer mechanism therefore requires considering message size, consumption of compute resources, and whether the communication operation benefits from computation inside the network.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Overlapping work within and across processors
The second decision is how to overlap computation, memory operations, and communication. An intra-SM schedule specializes different warps or threads within one streaming multiprocessor: some compute while others communicate. This works best when the computation and communication patterns align around the same data. Otherwise, forcing them together can create awkward divisions of registers and shared memory.
An inter-SM schedule assigns different processors to computation, communication, and memory work. Arora presents this as useful when the resource requirements do not align within a processor, or when intra-SM overlap struggles to maximize NVLink use. Her examples show intra-SM overlap working well for GEMM plus reduce-scatter, while inter-SM overlap works well for GEMM plus all-reduce with NVSwitch’s in-network reductions. These are examples of matching a schedule to an operation, rather than a claim that either schedule always wins.
Developers also need control over buffering and synchronization between senders and receivers. ParallelKittens packages these decisions into primitives and templates, typically adding roughly a dozen lines to a single-GPU kernel. Arora reports production use at Together AI and Cursor, and strong results against reference baselines across data, sequence, and expert parallelism. The abstraction’s purpose is to make these choices easier to express while retaining the control needed to tune them.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
ParallelKernelBench tests practical distributed work
ParallelKernelBench asks whether models’ promising single-GPU results generalize to multi-GPU design. Each task supplies an unoptimized PyTorch implementation using distributed NCCL operations, together with a topology specifying the number of ranks and the intra-node hardware configuration. The model must rewrite it as a performant CUDA kernel using unified virtual addressing.
The problem space grows combinatorially because a transformer layer can distribute work across data, sequence, tensor, context, layer, pipeline, and expert dimensions. Composing these choices changes the communication pattern. The team built a taxonomy and selected representative problems to cover these variations across inference, reinforcement learning, and post-training.
The resulting benchmark contains 87 problems drawn from GitHub repositories, optimized library implementations, and existing multi-GPU DSL work. Its intended payoff is practical: solving the tasks should produce useful production kernels for real workloads, rather than merely improve performance on artificial exercises.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Correctness improves faster than performance
The evaluation separates correctness from speed. Pass@K tracks whether correct kernels are found within K attempts. The performance metric, fast₁@K, additionally requires a correct solution to beat the PyTorch plus NCCL reference. In the zero-shot setting, the best tested frontier model solves 28 of 87 problems, with 22 solutions faster than the baseline.
Drawing multiple samples increases the number of correctly solved problems to 36, but the share with correct, faster solutions plateaus at roughly 31%. Additional parallel generations therefore show diminishing returns in the reported experiments. Where correctness is achieved, Arora attributes many speedups to removing NCCL staging overhead and using direct NVLink loads and stores.
Success concentrates in familiar patterns: collective primitives, tensor-parallel GEMMs, and Ulysses-style context parallelism. Arora interprets their prevalence in online material as a reason to question how much the models are generalizing through reasoning. The concentration is evidence of uneven coverage; it does not by itself establish how a model arrived at any particular solution.
Raising the required speedup makes the limitation more visible. Arora identifies GPT 5.5 as the strongest model in the comparison and reports that its count of qualifying kernels drops rapidly as the speedup threshold increases; she also compares DeepSeek V4 Pro. Beating a simple reference on some tasks is therefore a weaker achievement than consistently producing kernels with substantial speedups.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Retries repair syntax more readily than distributed design
The persistent failures go beyond CUDA syntax. Multiple samples or feedback on errors often get kernels to compile, but models still struggle with collective ordering, data partitioning, intra-SM versus inter-SM scheduling, and transfer selection. Arora also observes that generated kernels often omit register-level transfer instructions and tensor memory acceleration. Compilation removes one obstacle while leaving the central communication decisions unresolved.
The team also tested Gemini 3 Pro in a multi-turn coding-agent harness with access to a local bash environment. This increased solved problems from 24 to 35 of 87, with 26 exceeding the reference’s speed. Giving the agent more time eventually produced another plateau. The experiment shows that an interactive environment helps, while leaving open which additional methods could sustain improvement beyond that point.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Useful kernels emerge, but the design problem remains
Despite the aggregate limitations, Arora reports useful kernels emerging for problems that had not received extensive manual multi-GPU optimization. Her examples include a NeMo vocabulary-parallel filtering kernel, a context-parallel kernel for the Hyena architecture, and an intersection-over-union suppression kernel for the SAM 3 video segmentation model. These examples support the benchmark’s practical motivation, although she does not give individual speedup figures for them here.
Arora closes with a tension: a small set of programming primitives can capture many effective multi-GPU patterns, yet the tested models still struggle to reason through their tradeoffs even when supplied with them in context. She points toward better methods for solving the benchmark and architectures that evolve with larger scale-up domains, a shift away from scale-out, and larger on-chip memory structures. The opportunity extends from generating individual kernels to designing workloads that fit the changing balance between computation, memory, and networking.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Read the complete timestamped transcript
- 0:01
[music]
- 0:12
Hi everyone. Uh, sorry it's a bit loud
- 0:15
in here. Was not expecting this. Um, I'm
- 0:18
Siman. I'm a principal scientist at
- 0:20
Together AI. Um, I previously did my PhD
- 0:23
in the Hazy Research Lab with Chris Ray
- 0:25
at Stanford and I'm an incoming
- 0:27
professor at Caltech. Um I lead the
- 0:30
frontier performance research team at
- 0:33
together where we develop systems,
- 0:34
frameworks and algorithms to extract as
- 0:37
much performance as possible out of
- 0:39
modern um AI hardware. Today I want to
- 0:42
share a little bit about our
- 0:44
contributions towards simplifying the
- 0:46
development of uh multi-GPU AI kernels.
- 0:51
A few years ago, um, GPU utilization
- 0:54
used to be limited by poor intraGPU
- 0:57
memory access and single GPU kernels.
- 1:01
But with significant investment in
- 1:03
better kernels like flash attention, uh,
- 1:06
memory efficient architectures like from
- 1:08
deepseek, sparse attentions, mambas and
- 1:11
so on, um, and better DSLs, we've sort
- 1:14
of shifted the bottleneck to multi-GPU
- 1:17
communication.
- 1:21
During this talk, I'll start by telling
- 1:23
you a little bit about why now, why GPU
- 1:26
networking now. Then I'll tell you about
- 1:29
um the sort of problem space. So what
- 1:31
are the challenges in maximizing
- 1:33
hardware utilization and development
- 1:35
simplicity for multiGPU kernels. Um
- 1:38
three, we'll talk a little bit about the
- 1:40
fundamentals be behind designing
- 1:42
effective multiGGPU kernels. Four, we'll
- 1:45
look at whether frontier AI models can
- 1:49
uh leverage these fundamental
- 1:51
principles. Do they understand them? Can
- 1:53
they reason about them? Um, you know, in
- 1:55
theory, these models are very good at
- 1:57
reasoning. Um, and then five, we'll talk
- 2:00
through the results of these frontier
- 2:01
models on a benchmark that we've
- 2:03
developed called um parallel kernel
- 2:06
bench for multiGPU kernel generation
- 2:08
evaluation.
- 2:12
Okay, before we dive into those five
- 2:14
parts, just basic preliminaries. So,
- 2:17
this is an Nvidia GPU, uh, an H100 GPU
- 2:21
that you can see on the screen. Um, I
- 2:24
always like to help ground people in GPU
- 2:27
kernels via looking at the hardware. So,
- 2:30
these rainbow colored dots are
- 2:32
processors where actual compute is
- 2:34
happening. um all of the you know
- 2:36
parallel threads are operating within
- 2:38
one of those colored dots and there's
- 2:41
typically you know 100 200 of them on
- 2:44
modern AI GPUs.
- 2:47
Um around those processors you can see
- 2:50
um some of the memory that these
- 2:52
processors retrieve data so large
- 2:55
weights activations from. So these
- 2:58
rectangles between the colored dots are
- 3:01
an L2 cache slightly faster memory. um
- 3:04
not a ter like crazy large amount of it.
- 3:07
And then these black boxes are high
- 3:09
bandwidth memory. So when you Nvidia Smi
- 3:12
and see you know 80 gigabytes, 1008
- 3:15
gigabytes, whatever it is on your GPU,
- 3:17
that's that memory.
- 3:19
Um a GPU is operating a highly parallel
- 3:23
program. So multiple threads are
- 3:26
combined together in uh into larger
- 3:29
coarser units. and we schedule these
- 3:32
threads and and blocks onto these
- 3:34
processors to perform our AI compute.
- 3:38
Beyond the GPU, we'll have multiple GPUs
- 3:41
and we'll also have, you know, CPUs um
- 3:44
that have memory as well.
- 3:49
Um so to perform computation um the
- 3:53
memory that these threads use is going
- 3:55
to be stored in a really fast register
- 3:57
memory that's right next to the
- 3:59
computation units. um simple physics if
- 4:02
I am pulling data from very very close
- 4:06
to my proc my compute unit it's really
- 4:08
fast to get to it because it you know
- 4:10
that data is right next to me but
- 4:12
there's not a large radius and not a
- 4:14
large volume of space that's close by to
- 4:17
my process uh my my compute units and so
- 4:20
I don't have very much of it so you can
- 4:22
see that the fastest memory here the
- 4:24
registers is sup is you know 130
- 4:27
terabytes per second on an H100 but we
- 4:29
don't have very much on of it and as we
- 4:32
go to the further away memory we have a
- 4:34
lot more of it but it takes longer to
- 4:36
reach it. Uh again simple physics.
- 4:40
So in multiGPU systems in particular um
- 4:44
there is a hierarchy of interconnects.
- 4:46
So we will have something called PCIe um
- 4:49
as the channel for CPUGGPU
- 4:51
communications. We'll have multiGPU or
- 4:54
multi- uh node communications over
- 4:57
infiniband TCP and then in the we're
- 5:01
going to focus mostly on the Nvidia
- 5:03
sphere here. Um in uh the intraGPU
- 5:06
regime we'll have NVLink um providing
- 5:09
point-to-point connections between GPUs
- 5:12
and the NV switch. NV switch connects
- 5:15
all NVLink in endpoints into a
- 5:18
non-blocking fabric for full GPUGGPU
- 5:21
communication and NV switch is exciting
- 5:24
because it also provides support for in
- 5:26
network offdevice acceleration for oper
- 5:30
like communication primitives like
- 5:33
multiccast and reductions.
- 5:37
Okay, so diving in with the
- 5:39
preliminaries in mind. Why GPU
- 5:42
networking now?
- 5:44
So as I mentioned at the beginning,
- 5:46
we've really put a lot of effort into
- 5:49
making AIO uh more efficient over recent
- 5:52
years. Um again, we have uh
- 5:55
architectures that use less compute,
- 5:57
less memory like Mamba or sparse
- 5:59
attentions. We have algorithms that make
- 6:02
AI more hardware affair aware like flash
- 6:05
attention. We have tools to make it easy
- 6:08
to map AI algorithms to the hardware
- 6:10
like tileang, mojo, triton, gluon,
- 6:13
thunder kittens. Um, and we have new
- 6:16
techniques to overlap uh execution
- 6:19
across many AI operators very tightly
- 6:21
like mega kernels. And we also have
- 6:24
tools to make it easy to run on multiple
- 6:27
vendor and silicon platforms like
- 6:29
thunder mittens for Apple silicon or or
- 6:32
hipkittens for AMD and so on.
- 6:35
Um, at this point we really believe that
- 6:38
GPU networking offers many new and
- 6:40
exciting opportunities for AI
- 6:42
efficiency.
- 6:45
Modern AI workloads are getting very big
- 6:47
and require kernels that span multiple
- 6:50
um, you know, GPUs. So on many
- 6:53
production um distributed training and
- 6:56
inference workloads, communication is
- 6:58
increasingly consuming the majority of
- 7:01
the runtime and yields low model flop
- 7:04
utilization at scale.
- 7:08
So the uh pace of innovation and
- 7:11
diversity of approaches that different
- 7:13
hardware providers are taking in their
- 7:15
networking stacks is another reason why
- 7:17
it's an exciting time to study um you
- 7:20
know networking and communication. So we
- 7:22
can see here um AMD hardware with uh
- 7:26
what's called XGMI interconnects um
- 7:29
providing pointto-point links between
- 7:31
different GPUs in a scaleup domain. We
- 7:35
can see here TPU and uh interconnect uh
- 7:39
as well. So the TPU will use a 3D Taurus
- 7:42
and also have optical wraparound links.
- 7:45
So yet another diverse form of the
- 7:48
topology and links. Um and then again
- 7:50
for Nvidia we'll have the INV um switch
- 7:54
which integrates um compute capabilities
- 7:57
directly into the interconnect fabric
- 8:00
like for in network reductions and then
- 8:03
we'll have our NV link providing up to
- 8:05
you know 900 gigabytes of unidirectional
- 8:07
bandwidth between any two remote GPUs
- 8:10
high bandwidth memory um on you know
- 8:14
particular generation of Nvidia hardware
- 8:19
um Beyond the diversity in the
- 8:20
networking stacks, there's also a lot of
- 8:23
evolution in um how AI workloads are
- 8:27
adapting to take advantage of this
- 8:29
hardware and the diversity of types of
- 8:32
um you know hardware that we're we're
- 8:34
using simultaneously for one AI
- 8:36
workload. So um KV cache memory in
- 8:40
modern inference systems is going to
- 8:41
beworked across GPU, CPU, disk and
- 8:44
remote machines. um inference systems
- 8:47
increasingly disagregate different steps
- 8:50
of inference across different hardware
- 8:52
backends. So you could run speculative
- 8:54
decoding on some hardware, decode on
- 8:57
different hardware, prefill on different
- 8:58
hardware. Um hardware is also evolving
- 9:02
to have larger scaleup domains than ever
- 9:04
before with you know 72 GPUs and a
- 9:07
scaleup domain in in the coming um chips
- 9:10
and Nvidia planning on a single system
- 9:12
in 2027 with 576 GPUs.
- 9:17
Um at the same time to take advantage of
- 9:19
these more uh intensive scaleup domains
- 9:22
we're getting richer uh primitives for
- 9:24
fine grained control and kernel writing
- 9:27
over these domains. So we have something
- 9:30
called tensor memory acceleration where
- 9:32
we can provide uh perform asynchronous
- 9:35
network transfers from the device side
- 9:37
um on these GPUs.
- 9:40
So all of these changes are opening up
- 9:42
new opportunities and challenges in um
- 9:45
both AI you know how do we build models
- 9:48
that take advantage of these trends and
- 9:50
in systems.
- 9:53
Okay, so the problems that we're going
- 9:56
to go after um how do we get peak
- 9:58
hardware utilization and also
- 10:00
development simplicity um for these
- 10:03
multiGPU kernels.
- 10:06
So um it's been very difficult to write
- 10:10
multiGGPU kernels and there's a lot of
- 10:12
there are a lot of papers a lot of
- 10:14
systems reports that document you know
- 10:16
challenges here. Um, one of the things
- 10:19
here is it's compounded by the fact that
- 10:21
communication hardware around GPUs has
- 10:24
progressed a lot more slowly relative to
- 10:27
compute and memory. Um, so comparing
- 10:30
NVIDIA A100's in 2020 to B200s in 2024,
- 10:36
u BF16 tensor core speeds improved by
- 10:39
7.2x.
- 10:40
um while intra node communication by
- 10:43
just 3x and inter node communication by
- 10:46
just 2x. Um and coming back to my points
- 10:49
about how diverse networking is right
- 10:51
now things like tensor cores that run
- 10:54
map moles and our memory hierarchies are
- 10:57
pretty consistent and resemble one
- 10:59
another across diverse AI vendors and
- 11:01
multisilicon. Um but again as I I
- 11:04
mentioned the networking stack is
- 11:05
something that is really different
- 11:06
across vendors still
- 11:10
um you know a first step as we went
- 11:12
about all this work is to just study the
- 11:14
baselines um that are out there. So um
- 11:17
one of the popular tools for um
- 11:21
communications is this nickel library or
- 11:24
Rickle on AMD um that both you know
- 11:27
companies respectively spend a lot of
- 11:29
you know engineering investment into
- 11:31
releasing to make it easy for people to
- 11:33
do multiGPU work. Um but they're not
- 11:36
very flexible. So they're tuned for bulk
- 11:38
transfers for large contiguous chunks of
- 11:41
data transfers. And the design really
- 11:44
breaks down when you care about peak
- 11:46
performance, fine grain communication,
- 11:48
um, and sort of non-trivial collectives
- 11:51
that you want to fuse together.
- 11:54
So as a result, you can achieve much
- 11:56
higher performance by writing custom
- 11:58
communication kernels that directly
- 12:01
address these needs.
- 12:03
If we look at a naive baseline that's
- 12:05
representative of very popular libraries
- 12:08
in machine learning stacking pietorch
- 12:10
with nickel um we can we find that
- 12:13
across um you know the many uh problems
- 12:17
in our parallel kernel bench benchmark
- 12:19
that the majority of these um simple
- 12:22
baselines will fall below 50% of their
- 12:26
communication aware roof line bound. So
- 12:30
there's a lot of room for improvement
- 12:32
here.
- 12:33
Um the current frameworks beyond um
- 12:36
nickel which is popular in like Megatron
- 12:39
LM, Flex Flow, Nanoflow um you know all
- 12:43
again these systems are primarily
- 12:45
orchestrating bulk collectives via
- 12:47
nickel um and require synchronization
- 12:50
before and after data transfers. So
- 12:52
beyond th those off-the-shelf libraries,
- 12:54
we have compilers and DSLs that exist.
- 12:58
So there's Triton distributed is one of
- 13:01
them. Um and uh you know tile link is
- 13:04
another one. Um we have found that it's
- 13:07
very difficult to support the rapid pace
- 13:10
of networking improvements within these
- 13:12
frameworks. So our benchmarks and our
- 13:15
papers highlight results where Triton
- 13:17
distributed originally tuned around 8 uh
- 13:20
H800 GPUs fails to adapt efficiently to
- 13:24
other architectures like H100s.
- 13:27
And then the third category of how
- 13:30
people can proceed here is to really
- 13:32
handtune specific AI operators one by
- 13:36
one. So there's a lot of popular work um
- 13:38
DPP um comet ring attention um flux
- 13:43
flashdoe
- 13:45
um and then several distributed gem
- 13:47
kernels from cutless and these methods
- 13:50
achieve peak performance but often um
- 13:54
they do not you know some of these
- 13:56
methods have been designed in one
- 13:58
precision and it takes five or six
- 14:00
months to scale it to another precision
- 14:02
and just the scalability of this hand
- 14:04
tuning and um fine grain kernel writing
- 14:07
is not very um effective.
- 14:10
So um with this landscape in mind, our
- 14:13
research question was really about
- 14:15
whether there is a small set of
- 14:17
principles and fundamentals that really
- 14:20
governs multiGPU kernel writing and
- 14:23
whether there are methods that can
- 14:25
leverage those principles if they exist
- 14:27
to simplify the development of these
- 14:29
kernels.
- 14:32
Um I'll briefly highlight two works here
- 14:34
that um govern like that that represent
- 14:37
our approach. So first we think it's
- 14:40
important to build our own fundamental
- 14:42
understanding and to manually do the
- 14:44
work to understand it rather than just
- 14:46
throwing say an LLM at the problem. So
- 14:50
we spent the time to build out parallel
- 14:52
kittens which is a small set of minimal
- 14:55
primitives and patterns for multiGPU
- 14:57
kernels. Um we use this to understand
- 15:00
the trade-offs of multiGPU kernels and
- 15:03
to one write a large collection of um
- 15:06
peak performance kernels for a variety
- 15:09
of parallelism schemes. Um and this I
- 15:12
will use to hopefully you know educate
- 15:15
and bring us all on the same page on
- 15:16
what patterns we figured out. Um and
- 15:19
then once we found that there is indeed
- 15:22
a small set of trade-offs governing this
- 15:24
landscape, we were curious whether
- 15:26
models, especially these models right
- 15:28
now that claim to be very good at kernel
- 15:31
writing and also reasoning um could
- 15:34
reason about these trade-offs when we
- 15:36
provide them in context to actually
- 15:38
generate a bunch of net new multiGPU
- 15:40
kernels for us. Unfortunately, we found
- 15:44
they were not very good, but we'll dive
- 15:45
into more of that at the end.
- 15:48
Um so just the fundamental section this
- 15:50
is going to be more you know educational
- 15:52
what are the trade-offs that go into
- 15:54
these kernels.
- 15:56
So there are three main ways to do um
- 15:59
intraGPU data transfers. Um there's the
- 16:03
per GPU what's called copy engine and
- 16:06
this is host or CPU initiated work. It's
- 16:09
really good for large message transfers.
- 16:12
So when your message size, the amount of
- 16:15
data being transferred is really big um
- 16:17
and it can get to sort of like peak
- 16:19
bandwidth um on on the communication
- 16:22
side. In contrast, you can use device
- 16:25
initiated or GPU initiated transfers via
- 16:28
that tensor memory accelerator that I
- 16:30
mentioned or via register level
- 16:32
instructions called uh in sort of their
- 16:35
PTX lingo like LDST red multime. Um, and
- 16:40
the uh T TMA is really nice. These
- 16:43
device initiated ones are really nice
- 16:45
because they can saturate our NVLink
- 16:47
bandwidth using relatively small message
- 16:51
sizes. And this means that they can be
- 16:53
really nice when we're trying to do fine
- 16:55
grain communication rather than sending
- 16:57
bulk amounts of data over the links all
- 16:59
at once coarsely.
- 17:02
Um, there are some trade-offs here. So
- 17:05
the copy engine is really nice because
- 17:07
it doesn't take away or you know waste a
- 17:10
lot of our precious registers that I
- 17:12
mentioned are important for compute on
- 17:14
the GPU. Um and it doesn't also use any
- 17:18
of those rainbow colored dots the
- 17:20
processors on our GPU allowing us to
- 17:22
repurpose those for memory or um
- 17:25
computation on our uh you know other
- 17:27
parts of the AI pipeline. Um, TMA, the
- 17:31
second option here, consumes very few
- 17:33
registers, which is why it's nice. Um,
- 17:36
and it also can achieve high utilization
- 17:38
using very few of our processors. So,
- 17:41
it's a nice useful tool for fine grain
- 17:44
overlapping. Um, TMA does have
- 17:47
limitations. It can't effectively take
- 17:49
advantage of these in network um,
- 17:51
computations that I mentioned are
- 17:53
feasible with technologies like NV
- 17:55
switch. And the register level
- 17:58
instructions are really nice for being
- 18:00
able to take advantage of um you know
- 18:03
those those sort of in network
- 18:05
reductions that NV switch offers.
- 18:08
So again there are different tradeoffs
- 18:11
different functionalities that these
- 18:13
transfer mechanisms offer and they face
- 18:15
different trade-offs.
- 18:18
Second um beyond transfer mechanism the
- 18:21
trade-off is around how to overlap
- 18:24
compute memory and uh communication in
- 18:28
GPU kernels. So there's two main
- 18:30
categories of schedules. The first is
- 18:34
intraSM within one of those rainbow dots
- 18:38
um where we'll we'll have different
- 18:39
warps or threads within that processor
- 18:42
specialized to handle either compute or
- 18:45
one specialized for communication
- 18:47
concurrently. Um we can dedicate you
- 18:49
know different warps to each of these.
- 18:52
The challenge with this intm overlapping
- 18:55
is that the communication and
- 18:57
computation pattern really need to like
- 18:59
align and jive with one another. they
- 19:01
need to use the same data as inputs for
- 19:04
the computation and communication. When
- 19:07
they don't align, you could use
- 19:08
something like interm um schedules that
- 19:12
are shown on your right here where we'll
- 19:15
now have each of the different rainbow
- 19:17
colored dots on our GPUs, those
- 19:19
different processors specialized to
- 19:21
compute communication and memory. Um and
- 19:26
so this this is nice when the colonel
- 19:29
would others wise need to split across
- 19:31
resources like the register file or
- 19:33
shared memory um across these different
- 19:36
steps in misaligned ways.
- 19:41
Um this is also really nice when it's
- 19:43
hard to maximize NVLink traversal with
- 19:45
intram
- 19:47
overlapping.
- 19:50
So I just wanted to highlight one quick
- 19:52
example here where each of the patterns
- 19:54
excels in popular you know AI uh uh like
- 19:57
kind of patterns that you'll see. So on
- 20:00
a gem plus uh reduced uh scatter here we
- 20:04
can see that the um intraSM overlapping
- 20:08
scheduleuler schedule is very effective
- 20:11
in the gem plus all reduce we can see
- 20:14
that the interSM which again leverages
- 20:17
the in network reductions of envy switch
- 20:19
is very effective. So we face these
- 20:22
trade-offs and you can read more about
- 20:24
um the design decisions that go into
- 20:26
them in our parallel kittens paper.
- 20:30
Um, and then finally, ideally,
- 20:31
abstraction should allow the developer
- 20:33
flexibility to control how they're
- 20:35
buffering and synchronizing between data
- 20:39
senders and receivers.
- 20:41
So, we encapsulated these ideas into
- 20:44
parallel kittens. Again, a simple set of
- 20:46
programming primitives and templates for
- 20:49
these multiGPU kernels. Parallel Kittens
- 20:52
is used in production at Together AI as
- 20:54
well as our partner um you know Cursor
- 20:57
and other uh companies in the AI space.
- 21:01
Um here's some sample code. I won't
- 21:03
spend too much time here, but we usually
- 21:05
add roughly a dozen lines of code over a
- 21:07
single GPU kernel to insert these
- 21:10
multiGPU primitives.
- 21:13
Um, and you can see here across data
- 21:16
sequence and expert parallelism how our
- 21:19
parallel kittens kernels are achieving
- 21:22
state-of-the-art results um, compared to
- 21:24
strong reference baselines. And you can
- 21:26
check out our repo to learn more.
- 21:30
Okay, so we understand a little bit
- 21:33
about um the trade-offs that underly
- 21:35
these multiGPU kernels and there's just
- 21:37
a couple main, you know, ones that
- 21:39
exist. So can models reason through them
- 21:42
um and give us these uh you know kernels
- 21:45
models are getting better at reasoning
- 21:47
today. Um do they generalize well to
- 21:50
these problems or are we benchmaxed on
- 21:53
you know benchmarks of the past which
- 21:55
are more single GPU centric
- 21:58
uh models right now are showing really
- 22:00
promising results on single GPU uh
- 22:02
benchmarks. So it's a ripe time to to
- 22:05
extend it.
- 22:07
In our benchmark parallel kernel bench,
- 22:10
each task presents the model with an
- 22:12
unoptimized reference implementation
- 22:14
written in PyTorch with torch
- 22:16
distributed um nickel operations and
- 22:19
then a system topology that specifies
- 22:22
the number of ranks and intraode
- 22:24
hardware configuration. And the model
- 22:26
needs to rewrite the reference into a
- 22:28
performance CUDA kernel that uh uses
- 22:31
unified virtual addressing.
- 22:37
The um multiGPU problem space expands
- 22:40
combinatorally beyond single GPU um
- 22:44
cases. So a standard transformer layer
- 22:46
can be parallelized across data
- 22:49
sequence, tensor, context, layer,
- 22:51
pipeline and expert dimensions. and each
- 22:53
composition um induces a different
- 22:56
communication pass uh pattern. So to
- 22:58
make sure that our benchmark has high
- 23:01
coverage over the representative types
- 23:03
of multiGPU problems um we created this
- 23:06
taxonomy um that you can read more about
- 23:09
in our paper and then picked
- 23:10
representative problems for each part of
- 23:12
the taxonomy.
- 23:15
Um these are all patterns that arise in
- 23:18
real AI workloads from inference to RL
- 23:20
to post-training.
- 23:23
There are 87 problems overall um drawn
- 23:26
from GitHub repositories that we found
- 23:29
to be very informative. Um and we uh and
- 23:34
like optimized library implementations
- 23:36
and DSLs that people have written
- 23:38
multiGPU kernels in.
- 23:40
Um, we wanted to really make sure that
- 23:42
solving PK this parallel kernel bench
- 23:45
would lead to net new useful production
- 23:47
kernels rather than artificial or
- 23:49
useless kernels.
- 23:51
Okay, so that's parallel kernel bench.
- 23:54
How do models perform?
- 23:58
So we measured to sorry that this is a
- 24:00
bit small. We measured two main metrics.
- 24:03
Um pass at K which is the number of
- 24:06
correct kernels generated after K
- 24:08
attempts and then fast um one at K which
- 24:13
counts solutions that are both correct
- 24:16
and outperform the speed of the pi torch
- 24:19
plus nickel baseline.
- 24:21
Um so pass K just correctness fast one
- 24:25
at K is whether you're getting a 1x or
- 24:28
higher speed up over the reference. So
- 24:30
performanceoriented
- 24:32
um we found that in the zeroot setting
- 24:35
the best of the frontier models we tried
- 24:37
solves 28 out of 87 problems and 22 of
- 24:41
those problems are faster than the
- 24:42
pietorch plus nickel baseline.
- 24:45
If we make multiple samples, you know,
- 24:47
standard uh scaling up test time
- 24:50
compute, we can uh get that number from
- 24:54
say like to to 36 correct solutions, but
- 24:57
the fast uh one performance still
- 25:01
plateaus out at roughly 31%. So we don't
- 25:05
see much room from continuing to scale
- 25:07
there as we increase the number of
- 25:09
parallel generations.
- 25:12
Um we find that the correct once
- 25:14
correctness is established um speedups
- 25:16
naturally come from eliminating nickel
- 25:18
staging overhead in favor of direct
- 25:20
NVLink loads in stores.
- 25:24
Um the success patterns here are really
- 25:27
concentrated into familiar patterns. So
- 25:30
collective primitives, tensor parallel
- 25:32
gems and Ulyses style context
- 25:34
parallelism. So in other words, patterns
- 25:37
that we see heavily represented um on
- 25:40
the internet rather than necessarily
- 25:43
patterns that the model has used its
- 25:45
reasoning abilities to think through.
- 25:50
Okay, even the best available model that
- 25:53
we benchmarked here GPT 5.5 drops off
- 25:56
very quickly as the speed up threshold
- 25:59
increases. So on the x-axis here, we're
- 26:02
increasing the speed up threshold over
- 26:04
that pietor torch plus nickel baseline.
- 26:07
And then we're showing the number of
- 26:09
correct kernels that are faster than
- 26:11
that baseline or this much faster than
- 26:13
the baseline on the y-axis.
- 26:16
So GPT 5.5 is this orange line here and
- 26:20
then DeepSeek V4 Pro is the aqua line at
- 26:24
the bottom.
- 26:28
um we found that there's deeper issues
- 26:31
than CUDA syntax. So we found that if
- 26:34
you do multiple sampling or have the
- 26:36
model kind of look at its errors and
- 26:38
correct them, it can often compile the
- 26:41
kernels. But the models really struggle
- 26:44
to reason through the tradeoffs that we
- 26:46
talked about in the prior section. um
- 26:48
collective ordering, data partitioning,
- 26:50
thinking about intra versus interm
- 26:53
scheduling or deciding between the
- 26:55
different transfer mechanisms. Um we
- 26:58
find that they often do not use things
- 27:00
like the register transfer instructions
- 27:02
or tensor memory acceleration when
- 27:04
writing the kernels.
- 27:07
Um we wanted to try a pretty simple
- 27:10
instantiation of something like a clawed
- 27:12
code um coding agent. So, we took uh the
- 27:17
mini sui agent multi-turn harness and
- 27:20
one of the best performing models,
- 27:21
Gemini 3 Pro, and gave it access to a
- 27:24
local bash environment to sort of mimic
- 27:26
the standard claude code setup. We found
- 27:29
that this could help the agent um go
- 27:33
from solving 24 problems to 35 of 87
- 27:36
problems um with um 26 achieving over a
- 27:41
1x speed up over the reference. But we
- 27:44
found that as we scaled the amount of
- 27:46
time um the performance plateaued as uh
- 27:50
and we find that additional techniques
- 27:52
would be required to continue seeing the
- 27:54
scaling there. Again these results are
- 27:57
discussed in more detail in our paper.
- 28:00
Um we think this is a really exciting
- 28:02
you know just to wrap up here we hope
- 28:04
that people out here can use both
- 28:05
parallel kittens and parallel kernel
- 28:07
bench. We think that the kernels
- 28:09
generated from solving parallel kernel
- 28:11
bench will lead to net new production
- 28:14
kernels that are important bottlenecks
- 28:16
for inference in RL right now. um
- 28:19
they're you know we tried our best to
- 28:21
make them you know non-artificial and we
- 28:23
can already see signs of life and
- 28:25
exciting results where people have not
- 28:27
invested a bunch of time to handw write
- 28:29
a multiGPU kernel and we've gotten some
- 28:31
net new interesting ones like this Nemo
- 28:34
vocab parallel um you know filtering
- 28:37
kernel um a hyena architecture context
- 28:41
parallelism kernel
- 28:44
and uh the SAM 3 video segmentation
- 28:48
model um IOU suppression kernel.
- 28:52
Just to conclude here um we're really
- 28:54
excited about um how uh well just
- 28:59
talking about the lessons. First off, we
- 29:00
think there aren't that many patterns
- 29:02
that are involved in writing intragpu
- 29:05
effective kernels again encapsulated by
- 29:08
our small set of programming primitives.
- 29:11
Um, but unfortunately models do not
- 29:13
currently understand how to reason
- 29:15
through these trade-offs even when we
- 29:16
provide them in context. Um, we're
- 29:19
really excited about methods that can
- 29:21
help attack this benchmark. We're
- 29:23
excited about architectures that can
- 29:25
grow with the trends of how networking
- 29:27
stacks are evolving. Um, you know,
- 29:29
larger scale up domains shift away from
- 29:32
scale out um and massive onchip memory
- 29:35
structures. And we hope that uh you know
- 29:38
we can also extend and you you can feel
- 29:40
free to reach out to me at my email.
- 29:42
Thanks.