← All AI Engineer talks

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.

0:180:20
Suggest correction

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

0:01 · section reference included

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.

2:172:30
Suggest correction

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

2:12 · section reference included

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.

5:445:46
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

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.

10:1910:21
Suggest correction

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

9:53 · section reference included

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.

14:1014:13
Suggest correction

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

14:10 · section reference included

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.

15:5616:03
Suggest correction

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

15:56 · section reference included

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.

18:1818:21
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 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.

21:3021:39
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 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.

23:5824:00
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 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.

26:2826:31
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

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.

28:0028:04
Suggest correction

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

28:00 · section reference included

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.