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 why communication has become a limiting resource in many production distributed training and inference workloads, distills multi-GPU kernel design into transfer and scheduling choices, and tests whether models can make those choices across 87 practical problems.

From a talk by Simran Arora

At a glance

Ideas worth remembering

  • Communication now 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.

  • Fast multi-GPU kernels match the transfer path to message size, GPU resource use, desired overlap, and any need for in-network reduction.

  • Scheduling is operation-specific: intra-SM overlap works when computation and communication align around the same data, while inter-SM specialization helps when their resources or communication patterns diverge.

  • Correctness and speed are separate benchmark outcomes. The best zero-shot result is 28 correct kernels out of 87, with 22 faster than the reference; more samples reach 36 correct while correct-and-faster performance plateaus near 31%.

  • A shell-equipped agent harness improves iteration—Gemini 3 Pro reaches 35 solved problems and 26 faster solutions—but ordering, partitioning, scheduling, and transfer selection remain difficult after compilation errors are repaired.

  • Limited aggregate coverage can still yield useful kernels, including the reported NeMo, Hyena, and SAM 3 examples, but reliable reasoning about evolving multi-GPU systems remains open.

The bottleneck moves between GPUs

Work inside one GPU has improved through kernels such as FlashAttention, memory-efficient architectures, sparse attention, and better domain-specific languages. Arora’s starting point is the consequence of that progress: as single-GPU execution gets better, communication between GPUs becomes a larger share of the remaining runtime. The new problem is to make kernels spanning several GPUs fast without requiring months of specialized engineering for each operator.

The hardware explains why data movement matters. Threads and blocks execute on processors distributed across the GPU. Those processors retrieve weights and activations through a hierarchy that includes a relatively small L2 cache and much larger high-bandwidth memory. Registers sit closest to computation and can supply data at a cited 130 terabytes per second on an H100, but their capacity is limited. Moving farther away generally provides more storage at the cost of slower access.

Multiple GPUs extend that hierarchy into a network. PCIe carries CPU–GPU traffic, while communication across nodes can use InfiniBand or TCP. Within the NVIDIA systems emphasized in the talk, NVLink connects GPUs point to point and NVSwitch joins NVLink endpoints into a nonblocking fabric. NVSwitch can also accelerate operations such as multicast and reductions in the network rather than requiring every step to run on a GPU.

How it fits togetherData gets larger—and farther away

Closest to computation and very fast, but scarce.

Within a GPU, fast, scarce registers give way to larger memories farther from computation. Beyond the GPU, communication links provide access to remote memory; the links are not additional storage tiers.

0:421:12
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:12 · section reference included

Workloads and hardware are becoming more network-shaped

Several optimization layers 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 distributed training and inference still exchange data. Arora reports that communication increasingly consumes most of the runtime in many production workloads, leaving low model FLOP utilization as systems scale.

Networking is also less uniform than matrix multiplication or memory hierarchies. The talk contrasts AMD’s point-to-point XGMI links, TPU systems using a 3D torus with optical wraparound links, and NVIDIA’s NVSwitch fabric with in-network reductions. Arora cites up to 900 gigabytes per second of unidirectional NVLink bandwidth between remote GPUs’ high-bandwidth memories on a particular NVIDIA generation. That hardware qualification matters: it is an example of one system, not a universal link rate.

The workloads themselves now cross more boundaries. KV-cache storage can span GPU memory, CPU memory, disk, and remote machines. Inference systems can place speculative decoding, prefill, and decode on different hardware. Arora also describes scale-up domains reaching 72 GPUs and cites a plan for a 576-GPU system in 2027. Device-side tensor memory acceleration adds asynchronous transfers to this environment, giving kernels finer control over when communication begins and how it overlaps with other work.

Compute has nevertheless improved faster than the links carrying its data. From NVIDIA’s A100 in 2020 to B200 in 2024, the reported BF16 tensor-core gain is 7.2×, compared with 3× for intra-node communication and 2× for inter-node communication. Faster arithmetic cannot remove that mismatch. It increases the amount of useful computation that can sit idle while communication catches up.

5:376:07
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:37 · section reference included

Convenient collectives leave a performance gap

NCCL makes common multi-GPU operations accessible, but its bulk-transfer orientation does not fit every kernel. It works naturally with large contiguous chunks. Fine-grained communication, tightly fused collectives, and communication that must overlap with a particular computation require more control. In the team’s benchmark, most simple PyTorch-plus-NCCL baselines fall below 50% of their communication-aware roofline, leaving headroom even after accounting for the communication limit.

The available alternatives each carry a cost:

  • Higher-level frameworks: Systems built around bulk NCCL collectives often synchronize before and after transfers, preserving the same coarse execution structure.
  • Compilers and distributed DSLs: These can offer better abstractions, but tuning may not transfer across rapidly changing network architectures. Arora cites a distributed compiler configuration tuned around eight H800 GPUs that did not adapt efficiently to H100s in the team’s results.
  • Hand-tuned operators: Specialized kernels can reach peak performance, but the work does not scale. Arora says adapting some implementations from one precision to another can take five or six months.

This leads to the project’s core research question: can a small set of reusable principles capture the important decisions in multi-GPU kernel design? The team first investigated those decisions manually through ParallelKittens, a compact set of primitives and patterns used to build high-performance kernels across several parallelism schemes. Only after developing that understanding did they ask whether language models could apply it.

11:1011:40
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:10 · section reference included

Choose the transfer mechanism to fit the message

The first reusable decision is how data crosses GPUs. A copy engine performs host-initiated transfers and suits large messages that can approach peak communication bandwidth. Because the transfer does not occupy the GPU’s compute processors or consume many of its registers, those resources remain available for other parts of the workload.

Device-initiated communication offers two other paths. Tensor memory acceleration, or TMA, can saturate NVLink with relatively small messages while consuming few registers and few processors, making it useful for fine-grained overlap. Register-level transfer instructions also support fine-grained movement and can exploit the in-network reductions that NVSwitch provides. TMA cannot effectively use those in-network computations in the design space Arora describes.

There is no single best path. Large independent transfers favor the copy engine’s resource isolation. Small transfers interleaved with computation favor device initiation. Operations that need reduction inside the switch may justify register-level instructions. The kernel writer must trade message size against register pressure, processor use, overlap, and network functionality.

Compare the ideasThree paths for inter-GPU data

Host-initiated; strong for large messages; leaves processors and registers available.

The useful choice depends on message size, GPU resource consumption, desired overlap, and whether the operation needs computation inside NVSwitch.

16:0017:00
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

16:00 · section reference included

Overlap work within an SM—or divide it across SMs

After choosing a transfer mechanism, the kernel must schedule computation, memory work, and communication. An intra-SM schedule assigns different warps or threads inside one streaming multiprocessor to compute and communication concurrently. This is effective when both activities consume the same data in compatible patterns. When their data or resource needs diverge, packing them into one SM can create awkward competition for registers and shared memory.

An inter-SM schedule instead gives different streaming multiprocessors distinct responsibilities for computation, communication, or memory work. This can avoid misaligned resource sharing and can better drive NVLink when intra-SM overlap cannot. Arora’s examples are operation-specific: intra-SM overlap works well for GEMM plus reduce-scatter, while inter-SM overlap works well for GEMM plus all-reduce when it uses NVSwitch’s in-network reduction capability.

Buffering and synchronization between senders and receivers remain part of the design. ParallelKittens packages these choices into programming primitives and templates while preserving developer control over them. Arora reports that the approach typically adds roughly a dozen lines to a single-GPU kernel and is used in production at Together AI and Cursor. The displayed comparisons show state-of-the-art results against strong reference baselines across data, sequence, and expert parallelism.

Compare the ideasTwo ways to overlap communication and computation

Different warps in one SM specialize in compute or communication. Best when their data patterns align.

The schedule follows data alignment and resource pressure; neither strategy is universally superior.

18:1818:48
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

18:18 · section reference included

ParallelKernelBench tests practical distributed design

ParallelKernelBench asks whether promising single-GPU kernel-generation results carry over to multi-GPU design. Each task gives a model an unoptimized PyTorch reference using distributed NCCL operations and a topology specifying the rank count and intra-node hardware. The model must replace that reference with a performant CUDA kernel that uses unified virtual addressing.

The search space grows combinatorially because a transformer layer can be parallelized across data, sequence, tensor, context, layer, pipeline, and expert dimensions. Each composition changes which data must move, which ranks participate, and when communication occurs. The team built a taxonomy covering these patterns and selected 87 problems arising in inference, reinforcement learning, and post-training, drawing from real repositories, optimized libraries, and existing DSL implementations.

The benchmark is intended to produce useful kernels rather than isolated programming puzzles. Its references represent work that practitioners already express through PyTorch and NCCL, while the candidates must provide an optimized implementation for the supplied topology. The public ParallelKernelBench repository contains the benchmark and evaluation harness.

How it fits togetherWhat one benchmark task asks the model to do

Unoptimized implementation using distributed NCCL operations.

A topology-aware rewrite must preserve per-rank behavior while replacing coarse distributed operations with a faster kernel.

21:3022:00
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

21:30 · section reference included

Correctness improves faster than performance

The evaluation separates two outcomes. pass@K asks whether at least one correct kernel appears within K attempts. The performance-oriented fast₁@K also requires the candidate to beat the PyTorch-plus-NCCL reference. That distinction matters because a compiling, numerically correct kernel may still communicate inefficiently or leave hardware idle.

In the zero-shot setting, the best tested frontier model solves 28 of 87 problems, and 22 of those solutions beat the reference. Drawing additional samples raises the number of correct solutions to 36, but the correct-and-faster share plateaus at roughly 31%. More parallel generations therefore find additional valid implementations without producing a comparable rise in high-performance ones.

When a solution is correct, its speedup often comes from removing NCCL staging and replacing it with direct NVLink loads and stores. Success clusters around familiar collective primitives, tensor-parallel GEMMs, and Ulysses-style context parallelism. Arora interprets this concentration as a sign that models perform best on patterns well represented online. It suggests uneven generalization, although the distribution alone cannot reveal the reasoning process behind any individual solution.

The talk identifies GPT 5.5 as the strongest model in the displayed comparison and reports that its qualifying solution count drops quickly as the required speedup rises. Beating a coarse reference on some tasks is therefore a lower bar than consistently finding kernels with substantial gains.

23:5824:28
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

23:58 · section reference included

Retries fix syntax more readily than distributed design

The persistent failures are deeper than CUDA syntax. Multiple samples or error feedback often get a kernel to compile, but models still mishandle collective ordering, data partitioning, intra-SM versus inter-SM scheduling, and transfer selection. Generated kernels also often omit TMA and register-level transfer instructions. Compilation proves that the program is expressible; it does not prove that the model chose the right communication design.

The team also placed Gemini 3 Pro in a multi-turn mini-SWE-agent harness with access to a local shell. This improved the result from 24 solved problems to 35 of 87, with 26 candidates beating the reference. More execution time eventually reached another plateau. The environment helps the model inspect failures and revise code, but it does not supply the missing judgment about data movement and scheduling.

Aggregate limitations do not make the benchmark fruitless. Arora reports useful new examples for NeMo vocabulary-parallel filtering, Hyena context parallelism, and intersection-over-union suppression for the SAM 3 video-segmentation model. The talk does not give individual speedups for these kernels, so they demonstrate practical directions rather than quantified wins.

The ending preserves the central tension. A small set of primitives can express many effective multi-GPU patterns, yet the tested models still fail to apply their tradeoffs reliably even when those ideas are supplied in context. Arora points toward better methods for attacking the benchmark and toward architectures designed for larger scale-up domains, less dependence on scale-out, and much larger on-chip memories. Kernel generation is only one part of that opportunity: models and systems must ultimately be designed around the changing balance among computation, memory, and networking.

26:2826:58
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

26:28 · section reference included

Resources

From the talk

Read the complete timestamped transcript
  1. 0:01

    [music]

  2. 0:12

    Hi everyone. Uh, sorry it's a bit loud

  3. 0:15

    in here. Was not expecting this. Um, I'm

  4. 0:18

    Siman. I'm a principal scientist at

  5. 0:20

    Together AI. Um, I previously did my PhD

  6. 0:23

    in the Hazy Research Lab with Chris Ray

  7. 0:25

    at Stanford and I'm an incoming

  8. 0:27

    professor at Caltech. Um I lead the

  9. 0:30

    frontier performance research team at

  10. 0:33

    together where we develop systems,

  11. 0:34

    frameworks and algorithms to extract as

  12. 0:37

    much performance as possible out of

  13. 0:39

    modern um AI hardware. Today I want to

  14. 0:42

    share a little bit about our

  15. 0:44

    contributions towards simplifying the

  16. 0:46

    development of uh multi-GPU AI kernels.

  17. 0:51

    A few years ago, um, GPU utilization

  18. 0:54

    used to be limited by poor intraGPU

  19. 0:57

    memory access and single GPU kernels.

  20. 1:01

    But with significant investment in

  21. 1:03

    better kernels like flash attention, uh,

  22. 1:06

    memory efficient architectures like from

  23. 1:08

    deepseek, sparse attentions, mambas and

  24. 1:11

    so on, um, and better DSLs, we've sort

  25. 1:14

    of shifted the bottleneck to multi-GPU

  26. 1:17

    communication.

  27. 1:21

    During this talk, I'll start by telling

  28. 1:23

    you a little bit about why now, why GPU

  29. 1:26

    networking now. Then I'll tell you about

  30. 1:29

    um the sort of problem space. So what

  31. 1:31

    are the challenges in maximizing

  32. 1:33

    hardware utilization and development

  33. 1:35

    simplicity for multiGPU kernels. Um

  34. 1:38

    three, we'll talk a little bit about the

  35. 1:40

    fundamentals be behind designing

  36. 1:42

    effective multiGGPU kernels. Four, we'll

  37. 1:45

    look at whether frontier AI models can

  38. 1:49

    uh leverage these fundamental

  39. 1:51

    principles. Do they understand them? Can

  40. 1:53

    they reason about them? Um, you know, in

  41. 1:55

    theory, these models are very good at

  42. 1:57

    reasoning. Um, and then five, we'll talk

  43. 2:00

    through the results of these frontier

  44. 2:01

    models on a benchmark that we've

  45. 2:03

    developed called um parallel kernel

  46. 2:06

    bench for multiGPU kernel generation

  47. 2:08

    evaluation.

  48. 2:12

    Okay, before we dive into those five

  49. 2:14

    parts, just basic preliminaries. So,

  50. 2:17

    this is an Nvidia GPU, uh, an H100 GPU

  51. 2:21

    that you can see on the screen. Um, I

  52. 2:24

    always like to help ground people in GPU

  53. 2:27

    kernels via looking at the hardware. So,

  54. 2:30

    these rainbow colored dots are

  55. 2:32

    processors where actual compute is

  56. 2:34

    happening. um all of the you know

  57. 2:36

    parallel threads are operating within

  58. 2:38

    one of those colored dots and there's

  59. 2:41

    typically you know 100 200 of them on

  60. 2:44

    modern AI GPUs.

  61. 2:47

    Um around those processors you can see

  62. 2:50

    um some of the memory that these

  63. 2:52

    processors retrieve data so large

  64. 2:55

    weights activations from. So these

  65. 2:58

    rectangles between the colored dots are

  66. 3:01

    an L2 cache slightly faster memory. um

  67. 3:04

    not a ter like crazy large amount of it.

  68. 3:07

    And then these black boxes are high

  69. 3:09

    bandwidth memory. So when you Nvidia Smi

  70. 3:12

    and see you know 80 gigabytes, 1008

  71. 3:15

    gigabytes, whatever it is on your GPU,

  72. 3:17

    that's that memory.

  73. 3:19

    Um a GPU is operating a highly parallel

  74. 3:23

    program. So multiple threads are

  75. 3:26

    combined together in uh into larger

  76. 3:29

    coarser units. and we schedule these

  77. 3:32

    threads and and blocks onto these

  78. 3:34

    processors to perform our AI compute.

  79. 3:38

    Beyond the GPU, we'll have multiple GPUs

  80. 3:41

    and we'll also have, you know, CPUs um

  81. 3:44

    that have memory as well.

  82. 3:49

    Um so to perform computation um the

  83. 3:53

    memory that these threads use is going

  84. 3:55

    to be stored in a really fast register

  85. 3:57

    memory that's right next to the

  86. 3:59

    computation units. um simple physics if

  87. 4:02

    I am pulling data from very very close

  88. 4:06

    to my proc my compute unit it's really

  89. 4:08

    fast to get to it because it you know

  90. 4:10

    that data is right next to me but

  91. 4:12

    there's not a large radius and not a

  92. 4:14

    large volume of space that's close by to

  93. 4:17

    my process uh my my compute units and so

  94. 4:20

    I don't have very much of it so you can

  95. 4:22

    see that the fastest memory here the

  96. 4:24

    registers is sup is you know 130

  97. 4:27

    terabytes per second on an H100 but we

  98. 4:29

    don't have very much on of it and as we

  99. 4:32

    go to the further away memory we have a

  100. 4:34

    lot more of it but it takes longer to

  101. 4:36

    reach it. Uh again simple physics.

  102. 4:40

    So in multiGPU systems in particular um

  103. 4:44

    there is a hierarchy of interconnects.

  104. 4:46

    So we will have something called PCIe um

  105. 4:49

    as the channel for CPUGGPU

  106. 4:51

    communications. We'll have multiGPU or

  107. 4:54

    multi- uh node communications over

  108. 4:57

    infiniband TCP and then in the we're

  109. 5:01

    going to focus mostly on the Nvidia

  110. 5:03

    sphere here. Um in uh the intraGPU

  111. 5:06

    regime we'll have NVLink um providing

  112. 5:09

    point-to-point connections between GPUs

  113. 5:12

    and the NV switch. NV switch connects

  114. 5:15

    all NVLink in endpoints into a

  115. 5:18

    non-blocking fabric for full GPUGGPU

  116. 5:21

    communication and NV switch is exciting

  117. 5:24

    because it also provides support for in

  118. 5:26

    network offdevice acceleration for oper

  119. 5:30

    like communication primitives like

  120. 5:33

    multiccast and reductions.

  121. 5:37

    Okay, so diving in with the

  122. 5:39

    preliminaries in mind. Why GPU

  123. 5:42

    networking now?

  124. 5:44

    So as I mentioned at the beginning,

  125. 5:46

    we've really put a lot of effort into

  126. 5:49

    making AIO uh more efficient over recent

  127. 5:52

    years. Um again, we have uh

  128. 5:55

    architectures that use less compute,

  129. 5:57

    less memory like Mamba or sparse

  130. 5:59

    attentions. We have algorithms that make

  131. 6:02

    AI more hardware affair aware like flash

  132. 6:05

    attention. We have tools to make it easy

  133. 6:08

    to map AI algorithms to the hardware

  134. 6:10

    like tileang, mojo, triton, gluon,

  135. 6:13

    thunder kittens. Um, and we have new

  136. 6:16

    techniques to overlap uh execution

  137. 6:19

    across many AI operators very tightly

  138. 6:21

    like mega kernels. And we also have

  139. 6:24

    tools to make it easy to run on multiple

  140. 6:27

    vendor and silicon platforms like

  141. 6:29

    thunder mittens for Apple silicon or or

  142. 6:32

    hipkittens for AMD and so on.

  143. 6:35

    Um, at this point we really believe that

  144. 6:38

    GPU networking offers many new and

  145. 6:40

    exciting opportunities for AI

  146. 6:42

    efficiency.

  147. 6:45

    Modern AI workloads are getting very big

  148. 6:47

    and require kernels that span multiple

  149. 6:50

    um, you know, GPUs. So on many

  150. 6:53

    production um distributed training and

  151. 6:56

    inference workloads, communication is

  152. 6:58

    increasingly consuming the majority of

  153. 7:01

    the runtime and yields low model flop

  154. 7:04

    utilization at scale.

  155. 7:08

    So the uh pace of innovation and

  156. 7:11

    diversity of approaches that different

  157. 7:13

    hardware providers are taking in their

  158. 7:15

    networking stacks is another reason why

  159. 7:17

    it's an exciting time to study um you

  160. 7:20

    know networking and communication. So we

  161. 7:22

    can see here um AMD hardware with uh

  162. 7:26

    what's called XGMI interconnects um

  163. 7:29

    providing pointto-point links between

  164. 7:31

    different GPUs in a scaleup domain. We

  165. 7:35

    can see here TPU and uh interconnect uh

  166. 7:39

    as well. So the TPU will use a 3D Taurus

  167. 7:42

    and also have optical wraparound links.

  168. 7:45

    So yet another diverse form of the

  169. 7:48

    topology and links. Um and then again

  170. 7:50

    for Nvidia we'll have the INV um switch

  171. 7:54

    which integrates um compute capabilities

  172. 7:57

    directly into the interconnect fabric

  173. 8:00

    like for in network reductions and then

  174. 8:03

    we'll have our NV link providing up to

  175. 8:05

    you know 900 gigabytes of unidirectional

  176. 8:07

    bandwidth between any two remote GPUs

  177. 8:10

    high bandwidth memory um on you know

  178. 8:14

    particular generation of Nvidia hardware

  179. 8:19

    um Beyond the diversity in the

  180. 8:20

    networking stacks, there's also a lot of

  181. 8:23

    evolution in um how AI workloads are

  182. 8:27

    adapting to take advantage of this

  183. 8:29

    hardware and the diversity of types of

  184. 8:32

    um you know hardware that we're we're

  185. 8:34

    using simultaneously for one AI

  186. 8:36

    workload. So um KV cache memory in

  187. 8:40

    modern inference systems is going to

  188. 8:41

    beworked across GPU, CPU, disk and

  189. 8:44

    remote machines. um inference systems

  190. 8:47

    increasingly disagregate different steps

  191. 8:50

    of inference across different hardware

  192. 8:52

    backends. So you could run speculative

  193. 8:54

    decoding on some hardware, decode on

  194. 8:57

    different hardware, prefill on different

  195. 8:58

    hardware. Um hardware is also evolving

  196. 9:02

    to have larger scaleup domains than ever

  197. 9:04

    before with you know 72 GPUs and a

  198. 9:07

    scaleup domain in in the coming um chips

  199. 9:10

    and Nvidia planning on a single system

  200. 9:12

    in 2027 with 576 GPUs.

  201. 9:17

    Um at the same time to take advantage of

  202. 9:19

    these more uh intensive scaleup domains

  203. 9:22

    we're getting richer uh primitives for

  204. 9:24

    fine grained control and kernel writing

  205. 9:27

    over these domains. So we have something

  206. 9:30

    called tensor memory acceleration where

  207. 9:32

    we can provide uh perform asynchronous

  208. 9:35

    network transfers from the device side

  209. 9:37

    um on these GPUs.

  210. 9:40

    So all of these changes are opening up

  211. 9:42

    new opportunities and challenges in um

  212. 9:45

    both AI you know how do we build models

  213. 9:48

    that take advantage of these trends and

  214. 9:50

    in systems.

  215. 9:53

    Okay, so the problems that we're going

  216. 9:56

    to go after um how do we get peak

  217. 9:58

    hardware utilization and also

  218. 10:00

    development simplicity um for these

  219. 10:03

    multiGPU kernels.

  220. 10:06

    So um it's been very difficult to write

  221. 10:10

    multiGGPU kernels and there's a lot of

  222. 10:12

    there are a lot of papers a lot of

  223. 10:14

    systems reports that document you know

  224. 10:16

    challenges here. Um, one of the things

  225. 10:19

    here is it's compounded by the fact that

  226. 10:21

    communication hardware around GPUs has

  227. 10:24

    progressed a lot more slowly relative to

  228. 10:27

    compute and memory. Um, so comparing

  229. 10:30

    NVIDIA A100's in 2020 to B200s in 2024,

  230. 10:36

    u BF16 tensor core speeds improved by

  231. 10:39

    7.2x.

  232. 10:40

    um while intra node communication by

  233. 10:43

    just 3x and inter node communication by

  234. 10:46

    just 2x. Um and coming back to my points

  235. 10:49

    about how diverse networking is right

  236. 10:51

    now things like tensor cores that run

  237. 10:54

    map moles and our memory hierarchies are

  238. 10:57

    pretty consistent and resemble one

  239. 10:59

    another across diverse AI vendors and

  240. 11:01

    multisilicon. Um but again as I I

  241. 11:04

    mentioned the networking stack is

  242. 11:05

    something that is really different

  243. 11:06

    across vendors still

  244. 11:10

    um you know a first step as we went

  245. 11:12

    about all this work is to just study the

  246. 11:14

    baselines um that are out there. So um

  247. 11:17

    one of the popular tools for um

  248. 11:21

    communications is this nickel library or

  249. 11:24

    Rickle on AMD um that both you know

  250. 11:27

    companies respectively spend a lot of

  251. 11:29

    you know engineering investment into

  252. 11:31

    releasing to make it easy for people to

  253. 11:33

    do multiGPU work. Um but they're not

  254. 11:36

    very flexible. So they're tuned for bulk

  255. 11:38

    transfers for large contiguous chunks of

  256. 11:41

    data transfers. And the design really

  257. 11:44

    breaks down when you care about peak

  258. 11:46

    performance, fine grain communication,

  259. 11:48

    um, and sort of non-trivial collectives

  260. 11:51

    that you want to fuse together.

  261. 11:54

    So as a result, you can achieve much

  262. 11:56

    higher performance by writing custom

  263. 11:58

    communication kernels that directly

  264. 12:01

    address these needs.

  265. 12:03

    If we look at a naive baseline that's

  266. 12:05

    representative of very popular libraries

  267. 12:08

    in machine learning stacking pietorch

  268. 12:10

    with nickel um we can we find that

  269. 12:13

    across um you know the many uh problems

  270. 12:17

    in our parallel kernel bench benchmark

  271. 12:19

    that the majority of these um simple

  272. 12:22

    baselines will fall below 50% of their

  273. 12:26

    communication aware roof line bound. So

  274. 12:30

    there's a lot of room for improvement

  275. 12:32

    here.

  276. 12:33

    Um the current frameworks beyond um

  277. 12:36

    nickel which is popular in like Megatron

  278. 12:39

    LM, Flex Flow, Nanoflow um you know all

  279. 12:43

    again these systems are primarily

  280. 12:45

    orchestrating bulk collectives via

  281. 12:47

    nickel um and require synchronization

  282. 12:50

    before and after data transfers. So

  283. 12:52

    beyond th those off-the-shelf libraries,

  284. 12:54

    we have compilers and DSLs that exist.

  285. 12:58

    So there's Triton distributed is one of

  286. 13:01

    them. Um and uh you know tile link is

  287. 13:04

    another one. Um we have found that it's

  288. 13:07

    very difficult to support the rapid pace

  289. 13:10

    of networking improvements within these

  290. 13:12

    frameworks. So our benchmarks and our

  291. 13:15

    papers highlight results where Triton

  292. 13:17

    distributed originally tuned around 8 uh

  293. 13:20

    H800 GPUs fails to adapt efficiently to

  294. 13:24

    other architectures like H100s.

  295. 13:27

    And then the third category of how

  296. 13:30

    people can proceed here is to really

  297. 13:32

    handtune specific AI operators one by

  298. 13:36

    one. So there's a lot of popular work um

  299. 13:38

    DPP um comet ring attention um flux

  300. 13:43

    flashdoe

  301. 13:45

    um and then several distributed gem

  302. 13:47

    kernels from cutless and these methods

  303. 13:50

    achieve peak performance but often um

  304. 13:54

    they do not you know some of these

  305. 13:56

    methods have been designed in one

  306. 13:58

    precision and it takes five or six

  307. 14:00

    months to scale it to another precision

  308. 14:02

    and just the scalability of this hand

  309. 14:04

    tuning and um fine grain kernel writing

  310. 14:07

    is not very um effective.

  311. 14:10

    So um with this landscape in mind, our

  312. 14:13

    research question was really about

  313. 14:15

    whether there is a small set of

  314. 14:17

    principles and fundamentals that really

  315. 14:20

    governs multiGPU kernel writing and

  316. 14:23

    whether there are methods that can

  317. 14:25

    leverage those principles if they exist

  318. 14:27

    to simplify the development of these

  319. 14:29

    kernels.

  320. 14:32

    Um I'll briefly highlight two works here

  321. 14:34

    that um govern like that that represent

  322. 14:37

    our approach. So first we think it's

  323. 14:40

    important to build our own fundamental

  324. 14:42

    understanding and to manually do the

  325. 14:44

    work to understand it rather than just

  326. 14:46

    throwing say an LLM at the problem. So

  327. 14:50

    we spent the time to build out parallel

  328. 14:52

    kittens which is a small set of minimal

  329. 14:55

    primitives and patterns for multiGPU

  330. 14:57

    kernels. Um we use this to understand

  331. 15:00

    the trade-offs of multiGPU kernels and

  332. 15:03

    to one write a large collection of um

  333. 15:06

    peak performance kernels for a variety

  334. 15:09

    of parallelism schemes. Um and this I

  335. 15:12

    will use to hopefully you know educate

  336. 15:15

    and bring us all on the same page on

  337. 15:16

    what patterns we figured out. Um and

  338. 15:19

    then once we found that there is indeed

  339. 15:22

    a small set of trade-offs governing this

  340. 15:24

    landscape, we were curious whether

  341. 15:26

    models, especially these models right

  342. 15:28

    now that claim to be very good at kernel

  343. 15:31

    writing and also reasoning um could

  344. 15:34

    reason about these trade-offs when we

  345. 15:36

    provide them in context to actually

  346. 15:38

    generate a bunch of net new multiGPU

  347. 15:40

    kernels for us. Unfortunately, we found

  348. 15:44

    they were not very good, but we'll dive

  349. 15:45

    into more of that at the end.

  350. 15:48

    Um so just the fundamental section this

  351. 15:50

    is going to be more you know educational

  352. 15:52

    what are the trade-offs that go into

  353. 15:54

    these kernels.

  354. 15:56

    So there are three main ways to do um

  355. 15:59

    intraGPU data transfers. Um there's the

  356. 16:03

    per GPU what's called copy engine and

  357. 16:06

    this is host or CPU initiated work. It's

  358. 16:09

    really good for large message transfers.

  359. 16:12

    So when your message size, the amount of

  360. 16:15

    data being transferred is really big um

  361. 16:17

    and it can get to sort of like peak

  362. 16:19

    bandwidth um on on the communication

  363. 16:22

    side. In contrast, you can use device

  364. 16:25

    initiated or GPU initiated transfers via

  365. 16:28

    that tensor memory accelerator that I

  366. 16:30

    mentioned or via register level

  367. 16:32

    instructions called uh in sort of their

  368. 16:35

    PTX lingo like LDST red multime. Um, and

  369. 16:40

    the uh T TMA is really nice. These

  370. 16:43

    device initiated ones are really nice

  371. 16:45

    because they can saturate our NVLink

  372. 16:47

    bandwidth using relatively small message

  373. 16:51

    sizes. And this means that they can be

  374. 16:53

    really nice when we're trying to do fine

  375. 16:55

    grain communication rather than sending

  376. 16:57

    bulk amounts of data over the links all

  377. 16:59

    at once coarsely.

  378. 17:02

    Um, there are some trade-offs here. So

  379. 17:05

    the copy engine is really nice because

  380. 17:07

    it doesn't take away or you know waste a

  381. 17:10

    lot of our precious registers that I

  382. 17:12

    mentioned are important for compute on

  383. 17:14

    the GPU. Um and it doesn't also use any

  384. 17:18

    of those rainbow colored dots the

  385. 17:20

    processors on our GPU allowing us to

  386. 17:22

    repurpose those for memory or um

  387. 17:25

    computation on our uh you know other

  388. 17:27

    parts of the AI pipeline. Um, TMA, the

  389. 17:31

    second option here, consumes very few

  390. 17:33

    registers, which is why it's nice. Um,

  391. 17:36

    and it also can achieve high utilization

  392. 17:38

    using very few of our processors. So,

  393. 17:41

    it's a nice useful tool for fine grain

  394. 17:44

    overlapping. Um, TMA does have

  395. 17:47

    limitations. It can't effectively take

  396. 17:49

    advantage of these in network um,

  397. 17:51

    computations that I mentioned are

  398. 17:53

    feasible with technologies like NV

  399. 17:55

    switch. And the register level

  400. 17:58

    instructions are really nice for being

  401. 18:00

    able to take advantage of um you know

  402. 18:03

    those those sort of in network

  403. 18:05

    reductions that NV switch offers.

  404. 18:08

    So again there are different tradeoffs

  405. 18:11

    different functionalities that these

  406. 18:13

    transfer mechanisms offer and they face

  407. 18:15

    different trade-offs.

  408. 18:18

    Second um beyond transfer mechanism the

  409. 18:21

    trade-off is around how to overlap

  410. 18:24

    compute memory and uh communication in

  411. 18:28

    GPU kernels. So there's two main

  412. 18:30

    categories of schedules. The first is

  413. 18:34

    intraSM within one of those rainbow dots

  414. 18:38

    um where we'll we'll have different

  415. 18:39

    warps or threads within that processor

  416. 18:42

    specialized to handle either compute or

  417. 18:45

    one specialized for communication

  418. 18:47

    concurrently. Um we can dedicate you

  419. 18:49

    know different warps to each of these.

  420. 18:52

    The challenge with this intm overlapping

  421. 18:55

    is that the communication and

  422. 18:57

    computation pattern really need to like

  423. 18:59

    align and jive with one another. they

  424. 19:01

    need to use the same data as inputs for

  425. 19:04

    the computation and communication. When

  426. 19:07

    they don't align, you could use

  427. 19:08

    something like interm um schedules that

  428. 19:12

    are shown on your right here where we'll

  429. 19:15

    now have each of the different rainbow

  430. 19:17

    colored dots on our GPUs, those

  431. 19:19

    different processors specialized to

  432. 19:21

    compute communication and memory. Um and

  433. 19:26

    so this this is nice when the colonel

  434. 19:29

    would others wise need to split across

  435. 19:31

    resources like the register file or

  436. 19:33

    shared memory um across these different

  437. 19:36

    steps in misaligned ways.

  438. 19:41

    Um this is also really nice when it's

  439. 19:43

    hard to maximize NVLink traversal with

  440. 19:45

    intram

  441. 19:47

    overlapping.

  442. 19:50

    So I just wanted to highlight one quick

  443. 19:52

    example here where each of the patterns

  444. 19:54

    excels in popular you know AI uh uh like

  445. 19:57

    kind of patterns that you'll see. So on

  446. 20:00

    a gem plus uh reduced uh scatter here we

  447. 20:04

    can see that the um intraSM overlapping

  448. 20:08

    scheduleuler schedule is very effective

  449. 20:11

    in the gem plus all reduce we can see

  450. 20:14

    that the interSM which again leverages

  451. 20:17

    the in network reductions of envy switch

  452. 20:19

    is very effective. So we face these

  453. 20:22

    trade-offs and you can read more about

  454. 20:24

    um the design decisions that go into

  455. 20:26

    them in our parallel kittens paper.

  456. 20:30

    Um, and then finally, ideally,

  457. 20:31

    abstraction should allow the developer

  458. 20:33

    flexibility to control how they're

  459. 20:35

    buffering and synchronizing between data

  460. 20:39

    senders and receivers.

  461. 20:41

    So, we encapsulated these ideas into

  462. 20:44

    parallel kittens. Again, a simple set of

  463. 20:46

    programming primitives and templates for

  464. 20:49

    these multiGPU kernels. Parallel Kittens

  465. 20:52

    is used in production at Together AI as

  466. 20:54

    well as our partner um you know Cursor

  467. 20:57

    and other uh companies in the AI space.

  468. 21:01

    Um here's some sample code. I won't

  469. 21:03

    spend too much time here, but we usually

  470. 21:05

    add roughly a dozen lines of code over a

  471. 21:07

    single GPU kernel to insert these

  472. 21:10

    multiGPU primitives.

  473. 21:13

    Um, and you can see here across data

  474. 21:16

    sequence and expert parallelism how our

  475. 21:19

    parallel kittens kernels are achieving

  476. 21:22

    state-of-the-art results um, compared to

  477. 21:24

    strong reference baselines. And you can

  478. 21:26

    check out our repo to learn more.

  479. 21:30

    Okay, so we understand a little bit

  480. 21:33

    about um the trade-offs that underly

  481. 21:35

    these multiGPU kernels and there's just

  482. 21:37

    a couple main, you know, ones that

  483. 21:39

    exist. So can models reason through them

  484. 21:42

    um and give us these uh you know kernels

  485. 21:45

    models are getting better at reasoning

  486. 21:47

    today. Um do they generalize well to

  487. 21:50

    these problems or are we benchmaxed on

  488. 21:53

    you know benchmarks of the past which

  489. 21:55

    are more single GPU centric

  490. 21:58

    uh models right now are showing really

  491. 22:00

    promising results on single GPU uh

  492. 22:02

    benchmarks. So it's a ripe time to to

  493. 22:05

    extend it.

  494. 22:07

    In our benchmark parallel kernel bench,

  495. 22:10

    each task presents the model with an

  496. 22:12

    unoptimized reference implementation

  497. 22:14

    written in PyTorch with torch

  498. 22:16

    distributed um nickel operations and

  499. 22:19

    then a system topology that specifies

  500. 22:22

    the number of ranks and intraode

  501. 22:24

    hardware configuration. And the model

  502. 22:26

    needs to rewrite the reference into a

  503. 22:28

    performance CUDA kernel that uh uses

  504. 22:31

    unified virtual addressing.

  505. 22:37

    The um multiGPU problem space expands

  506. 22:40

    combinatorally beyond single GPU um

  507. 22:44

    cases. So a standard transformer layer

  508. 22:46

    can be parallelized across data

  509. 22:49

    sequence, tensor, context, layer,

  510. 22:51

    pipeline and expert dimensions. and each

  511. 22:53

    composition um induces a different

  512. 22:56

    communication pass uh pattern. So to

  513. 22:58

    make sure that our benchmark has high

  514. 23:01

    coverage over the representative types

  515. 23:03

    of multiGPU problems um we created this

  516. 23:06

    taxonomy um that you can read more about

  517. 23:09

    in our paper and then picked

  518. 23:10

    representative problems for each part of

  519. 23:12

    the taxonomy.

  520. 23:15

    Um these are all patterns that arise in

  521. 23:18

    real AI workloads from inference to RL

  522. 23:20

    to post-training.

  523. 23:23

    There are 87 problems overall um drawn

  524. 23:26

    from GitHub repositories that we found

  525. 23:29

    to be very informative. Um and we uh and

  526. 23:34

    like optimized library implementations

  527. 23:36

    and DSLs that people have written

  528. 23:38

    multiGPU kernels in.

  529. 23:40

    Um, we wanted to really make sure that

  530. 23:42

    solving PK this parallel kernel bench

  531. 23:45

    would lead to net new useful production

  532. 23:47

    kernels rather than artificial or

  533. 23:49

    useless kernels.

  534. 23:51

    Okay, so that's parallel kernel bench.

  535. 23:54

    How do models perform?

  536. 23:58

    So we measured to sorry that this is a

  537. 24:00

    bit small. We measured two main metrics.

  538. 24:03

    Um pass at K which is the number of

  539. 24:06

    correct kernels generated after K

  540. 24:08

    attempts and then fast um one at K which

  541. 24:13

    counts solutions that are both correct

  542. 24:16

    and outperform the speed of the pi torch

  543. 24:19

    plus nickel baseline.

  544. 24:21

    Um so pass K just correctness fast one

  545. 24:25

    at K is whether you're getting a 1x or

  546. 24:28

    higher speed up over the reference. So

  547. 24:30

    performanceoriented

  548. 24:32

    um we found that in the zeroot setting

  549. 24:35

    the best of the frontier models we tried

  550. 24:37

    solves 28 out of 87 problems and 22 of

  551. 24:41

    those problems are faster than the

  552. 24:42

    pietorch plus nickel baseline.

  553. 24:45

    If we make multiple samples, you know,

  554. 24:47

    standard uh scaling up test time

  555. 24:50

    compute, we can uh get that number from

  556. 24:54

    say like to to 36 correct solutions, but

  557. 24:57

    the fast uh one performance still

  558. 25:01

    plateaus out at roughly 31%. So we don't

  559. 25:05

    see much room from continuing to scale

  560. 25:07

    there as we increase the number of

  561. 25:09

    parallel generations.

  562. 25:12

    Um we find that the correct once

  563. 25:14

    correctness is established um speedups

  564. 25:16

    naturally come from eliminating nickel

  565. 25:18

    staging overhead in favor of direct

  566. 25:20

    NVLink loads in stores.

  567. 25:24

    Um the success patterns here are really

  568. 25:27

    concentrated into familiar patterns. So

  569. 25:30

    collective primitives, tensor parallel

  570. 25:32

    gems and Ulyses style context

  571. 25:34

    parallelism. So in other words, patterns

  572. 25:37

    that we see heavily represented um on

  573. 25:40

    the internet rather than necessarily

  574. 25:43

    patterns that the model has used its

  575. 25:45

    reasoning abilities to think through.

  576. 25:50

    Okay, even the best available model that

  577. 25:53

    we benchmarked here GPT 5.5 drops off

  578. 25:56

    very quickly as the speed up threshold

  579. 25:59

    increases. So on the x-axis here, we're

  580. 26:02

    increasing the speed up threshold over

  581. 26:04

    that pietor torch plus nickel baseline.

  582. 26:07

    And then we're showing the number of

  583. 26:09

    correct kernels that are faster than

  584. 26:11

    that baseline or this much faster than

  585. 26:13

    the baseline on the y-axis.

  586. 26:16

    So GPT 5.5 is this orange line here and

  587. 26:20

    then DeepSeek V4 Pro is the aqua line at

  588. 26:24

    the bottom.

  589. 26:28

    um we found that there's deeper issues

  590. 26:31

    than CUDA syntax. So we found that if

  591. 26:34

    you do multiple sampling or have the

  592. 26:36

    model kind of look at its errors and

  593. 26:38

    correct them, it can often compile the

  594. 26:41

    kernels. But the models really struggle

  595. 26:44

    to reason through the tradeoffs that we

  596. 26:46

    talked about in the prior section. um

  597. 26:48

    collective ordering, data partitioning,

  598. 26:50

    thinking about intra versus interm

  599. 26:53

    scheduling or deciding between the

  600. 26:55

    different transfer mechanisms. Um we

  601. 26:58

    find that they often do not use things

  602. 27:00

    like the register transfer instructions

  603. 27:02

    or tensor memory acceleration when

  604. 27:04

    writing the kernels.

  605. 27:07

    Um we wanted to try a pretty simple

  606. 27:10

    instantiation of something like a clawed

  607. 27:12

    code um coding agent. So, we took uh the

  608. 27:17

    mini sui agent multi-turn harness and

  609. 27:20

    one of the best performing models,

  610. 27:21

    Gemini 3 Pro, and gave it access to a

  611. 27:24

    local bash environment to sort of mimic

  612. 27:26

    the standard claude code setup. We found

  613. 27:29

    that this could help the agent um go

  614. 27:33

    from solving 24 problems to 35 of 87

  615. 27:36

    problems um with um 26 achieving over a

  616. 27:41

    1x speed up over the reference. But we

  617. 27:44

    found that as we scaled the amount of

  618. 27:46

    time um the performance plateaued as uh

  619. 27:50

    and we find that additional techniques

  620. 27:52

    would be required to continue seeing the

  621. 27:54

    scaling there. Again these results are

  622. 27:57

    discussed in more detail in our paper.

  623. 28:00

    Um we think this is a really exciting

  624. 28:02

    you know just to wrap up here we hope

  625. 28:04

    that people out here can use both

  626. 28:05

    parallel kittens and parallel kernel

  627. 28:07

    bench. We think that the kernels

  628. 28:09

    generated from solving parallel kernel

  629. 28:11

    bench will lead to net new production

  630. 28:14

    kernels that are important bottlenecks

  631. 28:16

    for inference in RL right now. um

  632. 28:19

    they're you know we tried our best to

  633. 28:21

    make them you know non-artificial and we

  634. 28:23

    can already see signs of life and

  635. 28:25

    exciting results where people have not

  636. 28:27

    invested a bunch of time to handw write

  637. 28:29

    a multiGPU kernel and we've gotten some

  638. 28:31

    net new interesting ones like this Nemo

  639. 28:34

    vocab parallel um you know filtering

  640. 28:37

    kernel um a hyena architecture context

  641. 28:41

    parallelism kernel

  642. 28:44

    and uh the SAM 3 video segmentation

  643. 28:48

    model um IOU suppression kernel.

  644. 28:52

    Just to conclude here um we're really

  645. 28:54

    excited about um how uh well just

  646. 28:59

    talking about the lessons. First off, we

  647. 29:00

    think there aren't that many patterns

  648. 29:02

    that are involved in writing intragpu

  649. 29:05

    effective kernels again encapsulated by

  650. 29:08

    our small set of programming primitives.

  651. 29:11

    Um, but unfortunately models do not

  652. 29:13

    currently understand how to reason

  653. 29:15

    through these trade-offs even when we

  654. 29:16

    provide them in context. Um, we're

  655. 29:19

    really excited about methods that can

  656. 29:21

    help attack this benchmark. We're

  657. 29:23

    excited about architectures that can

  658. 29:25

    grow with the trends of how networking

  659. 29:27

    stacks are evolving. Um, you know,

  660. 29:29

    larger scale up domains shift away from

  661. 29:32

    scale out um and massive onchip memory

  662. 29:35

    structures. And we hope that uh you know

  663. 29:38

    we can also extend and you you can feel

  664. 29:40

    free to reach out to me at my email.

  665. 29:42

    Thanks.