# NVIDIA CUDA: New Features and Beyond

## Abstract

Key takeaways Learn the latest updates and additions to NVIDIA CUDA™. Gain insights on the vision for future CUDA development and enhancement. Discover tips and tricks for using the latest capabilities effectively.

## AI Summary

_No AI summary available._

## Transcript

**[00:00:04 – 00:00:10]** So, today I have the greatest pleasure of introducing Rob

**[00:00:10 – 00:00:16]** Armstrong, Director of CUDA Technical Product Management.

**[00:00:16 – 00:00:19]** Rob Armstrong leads the Technical Product Management team for

**[00:00:19 – 00:00:21]** the CUDA Toolkit.

**[00:00:21 – 00:00:24]** For over 20 years, he has focused on accelerating software

**[00:00:24 – 00:00:27]** with heterogeneous hardware platforms and has a particular

**[00:00:27 – 00:00:31]** interest in computer architecture and hardware-software interaction.

**[00:00:31 – 00:00:35]** Please join me in a warm round of applause.

**[00:00:39 – 00:00:42]** ROB ARMSTRONG Thank you. Good morning everybody.

**[00:00:42 – 00:00:45]** My name is Rob Armstrong, and today I want to try to

**[00:00:45 – 00:00:49]** condense a lot of the new feature development in CUDA into about

**[00:00:49 – 00:00:53]** a 35 minute session and really have you hopefully walk away with an

**[00:00:53 – 00:00:57]** understanding of what we're trying to do in CUDA Toolkit in general.

**[00:00:57 – 00:01:00]** And I think I'll lead with the punchline here.

**[00:01:00 – 00:01:03]** Everything that we're doing in CUDA Toolkit is really focused

**[00:01:03 – 00:01:07]** on optimizations of code that you already have to make it run

**[00:01:07 – 00:01:12]** faster on GPUs of any generation, and then also to make it easier

**[00:01:12 – 00:01:15]** to write new kernels to run on new GPUs and take advantage of new

**[00:01:15 – 00:01:18]** hardware with a minimum of effort.

**[00:01:18 – 00:01:24]** And so this particular picture is really just indicative of that

**[00:01:24 – 00:01:26]** kind of thinking, and I'll show you a lot of examples or different

**[00:01:26 – 00:01:28]** things that we're doing throughout CUDA Toolkit and and the Compute

**[00:01:28 – 00:01:31]** Driver to help make that happen.

**[00:01:31 – 00:01:33]** Before I get into it, though, there's some kind of baseline

**[00:01:33 – 00:01:36]** boring stuff, and really it's about platform enablement.

**[00:01:36 – 00:01:39]** One of the things we do in CUDA and in the driver both is introduce

**[00:01:39 – 00:01:42]** and support new platforms, new operating systems, new compilers,

**[00:01:42 – 00:01:44]** and so on as they come out.

**[00:01:44 – 00:01:46]** This is all very bread and butter; it shouldn't be particularly

**[00:01:46 – 00:01:48]** surprising or interesting.

**[00:01:48 – 00:01:50]** The one thing I do want to highlight here, though, is

**[00:01:50 – 00:01:54]** with the introduction of the RTX Spark laptops and DGX Station,

**[00:01:55 – 00:01:58]** Windows on ARM is a fully supported part of the CUDA platform.

**[00:01:58 – 00:02:01]** And all of the same CUDA code that you can write for any

**[00:02:01 – 00:02:04]** other device or any other platform, you can also write on those.

**[00:02:04 – 00:02:08]** And so it's really nice to pick up applications and effectively

**[00:02:08 – 00:02:09]** run them out of the box.

**[00:02:09 – 00:02:13]** Beyond that, though, there are three big areas of development

**[00:02:13 – 00:02:15]** in CUDA, and I'll spend a little bit of time today

**[00:02:15 – 00:02:17]** talking about each one.

**[00:02:17 – 00:02:19]** We're working on ways that you can write fast kernels.

**[00:02:20 – 00:02:22]** These are kernels that get as close to speed of light

**[00:02:22 – 00:02:25]** performance on an individual GPU as possible with, like I

**[00:02:25 – 00:02:28]** said, the minimum amount of effort.

**[00:02:28 – 00:02:31]** A big part of the optimization space these days, though, is

**[00:02:31 – 00:02:34]** not so much what's happening inside an individual kernel, but how

**[00:02:34 – 00:02:37]** you orchestrate kernels together, how you overlap, copy, and

**[00:02:37 – 00:02:40]** compute, how you keep all the parts of the GPU engaged and operating,

**[00:02:40 – 00:02:42]** how you keep data flowing.

**[00:02:42 – 00:02:45]** And that feeds into, at the data center scale, how we

**[00:02:46 – 00:02:50]** keep large, multi-GPU systems productive and operating.

**[00:02:51 – 00:02:55]** So, jumping right into the first part, one of the things that people

**[00:02:55 – 00:02:58]** maybe sometimes miss about CUDA is that we have lots of different

**[00:02:58 – 00:02:59]** entry points into the stack.

**[00:02:59 – 00:03:00]** Some of them are very high level.

**[00:03:01 – 00:03:03]** We have CUTLASS and CUDA TILE.

**[00:03:03 – 00:03:04]** You can call libraries.

**[00:03:04 – 00:03:07]** You can drop to more low-level programming interfaces

**[00:03:07 – 00:03:08]** with CUDA C++ SIMT.

**[00:03:08 – 00:03:13]** You can drop even to inline PTX or very low-level device intrinsics.

**[00:03:13 – 00:03:15]** The important thing about all of these is that they

**[00:03:15 – 00:03:18]** are all pathways to speed of light performance, never

**[00:03:18 – 00:03:21]** giving up performance by operating at one level or the other.

**[00:03:21 – 00:03:24]** And keep this in mind because when we start to talk about some

**[00:03:24 – 00:03:27]** agentic optimizations or agentic workflows, I think this becomes

**[00:03:27 – 00:03:30]** very relevant, and I'll show you a slide that I think ties this

**[00:03:30 – 00:03:33]** together very quickly in a moment.

**[00:03:34 – 00:03:36]** One of the things that we're doing, though, as we migrate

**[00:03:36 – 00:03:39]** towards these higher levels of abstraction, is we're introducing

**[00:03:39 – 00:03:41]** a second path to the hardware.

**[00:03:41 – 00:03:43]** What you see on the right side of the slide here is what we've

**[00:03:43 – 00:03:44]** had effectively forever, right?

**[00:03:44 – 00:03:46]** You can start in a higher level language, you can write

**[00:03:46 – 00:03:50]** a kernel, that kernel gets compiled down to PTX, it then

**[00:03:50 – 00:03:54]** gets down to the bytecode that's gonna actually execute on the GPU.

**[00:03:54 – 00:03:57]** This is all pretty much manual, right?

**[00:03:57 – 00:04:00]** There is some compiler optimization that happens there, but it's sort

**[00:04:00 – 00:04:02]** of what you see is what you get.

**[00:04:02 – 00:04:04]** On the left side of the slide is where we're really leaning

**[00:04:04 – 00:04:05]** into new development.

**[00:04:05 – 00:04:08]** This is leveraging technologies like MLIR

**[00:04:09 – 00:04:13]** to do mappings of algorithms to hardware implementations

**[00:04:13 – 00:04:15]** for a particular GPU.

**[00:04:15 – 00:04:17]** And this is what allows us to take something like a gem

**[00:04:17 – 00:04:22]** and say, I want to do a gem on a GB300 GPU, and then have code

**[00:04:22 – 00:04:26]** generation that will automatically use things like TMA, automatically

**[00:04:26 – 00:04:29]** set up TCGen5 instructions for the tensor cores, all

**[00:04:29 – 00:04:30]** these kinds of different things.

**[00:04:30 – 00:04:33]** So we have these two separate split pathways.

**[00:04:33 – 00:04:35]** They're both interoperable.

**[00:04:35 – 00:04:37]** You can use both in the same program; you can use both

**[00:04:37 – 00:04:38]** at different times.

**[00:04:38 – 00:04:41]** And the reason I'm mentioning this is because as we talk about some of

**[00:04:41 – 00:04:44]** the optimizations and so on, having these two compiler paths playing

**[00:04:44 – 00:04:47]** nicely together and interoperating is a key part of a lot of the

**[00:04:47 – 00:04:50]** things that we're putting together.

**[00:04:50 – 00:04:54]** And it allows us to do stuff like this, where this is kind

**[00:04:54 – 00:04:57]** of the same thing I was talking about before, where if you look at

**[00:04:57 – 00:05:02]** performance on pre-written kernels across single GPU generation,

**[00:05:02 – 00:05:06]** CUDA release to release, our goal is to, if you recompile

**[00:05:06 – 00:05:11]** the program, give you better performance with each generation.

**[00:05:11 – 00:05:12]** And so this is a snapshot.

**[00:05:12 – 00:05:16]** This is Tile programming in CUDA Tile on a particular GPU, B200.

**[00:05:17 – 00:05:22]** Same code, same tuning from CUDA 13.1 to CUDA 13.4.

**[00:05:22 – 00:05:25]** And the numbers in the bar chart are indicative of what

**[00:05:25 – 00:05:26]** you see on B200 for these kernels.

**[00:05:27 – 00:05:31]** We've increased gem speed by 25%, MOE kernel by 72%.

**[00:05:31 – 00:05:35]** Pretty much everything has stayed either ISO performance or improved.

**[00:05:35 – 00:05:37]** We also, though, see pretty substantial improvement on

**[00:05:37 – 00:05:38]** older architectures.

**[00:05:38 – 00:05:42]** H200, for instance, H100, we got about a 2x improvement

**[00:05:42 – 00:05:45]** on gem and down the line.

**[00:05:45 – 00:05:47]** The nice thing about these higher level models is that

**[00:05:47 – 00:05:50]** you get these performance tuning enhancements effectively for free.

**[00:05:50 – 00:05:53]** If you had coded this kernel in CUTILE, it's significantly shorter,

**[00:05:53 – 00:05:57]** it's fewer lines of code, and then you don't have to go and rewrite

**[00:05:57 – 00:06:01]** the PTX, rewrite the low level C++ to take advantage of this tuning,

**[00:06:01 – 00:06:03]** the new heuristics and so on.

**[00:06:03 – 00:06:05]** You can just expect them to continue getting better from

**[00:06:05 – 00:06:07]** generation to generation.

**[00:06:07 – 00:06:11]** I think last time we did a GTC in Europe about a year

**[00:06:11 – 00:06:14]** ago, I was making this promise that we were going to do that,

**[00:06:14 – 00:06:16]** but we didn't really have the results to back it up yet.

**[00:06:16 – 00:06:21]** CUDA tile was very new, and it's pretty natural that you

**[00:06:21 – 00:06:21]** may not believe me.

**[00:06:22 – 00:06:24]** So I wanted to come back and sort of show you the results

**[00:06:24 – 00:06:26]** of a year's worth of optimization on these things and the performance

**[00:06:26 – 00:06:29]** improvements that came as a result.

**[00:06:29 – 00:06:31]** CUDA C++, though, continues to keep getting better.

**[00:06:31 – 00:06:35]** As we look at the very, I wouldn't say the lowest level, but one

**[00:06:35 – 00:06:40]** of the lower levels of the stack, we add a lot in each release.

**[00:06:40 – 00:06:42]** We continue to give you better diagnostics and messaging

**[00:06:43 – 00:06:43]** from the compilers.

**[00:06:43 – 00:06:47]** These are effectively to tell you why the compiler is choosing

**[00:06:47 – 00:06:50]** particular optimizations, or these days, more likely

**[00:06:50 – 00:06:54]** to tell you That your agents are choosing particular optimizations.

**[00:06:54 – 00:06:57]** We're giving you more control over explicit math functions.

**[00:06:57 – 00:07:00]** We're leaning a lot into JIT linking and link time optimization.

**[00:07:00 – 00:07:03]** What that allows us to do is fuse kernels at runtime

**[00:07:03 – 00:07:07]** so that you can have distinctly written kernels, but then as we

**[00:07:07 – 00:07:10]** go to run them on the GPU, we fuse them together to reduce interkernel

**[00:07:10 – 00:07:13]** overhead and reduce launch overhead and these kinds of things.

**[00:07:13 – 00:07:15]** And then we're also working quite a bit to make the binaries

**[00:07:15 – 00:07:19]** smaller by adding compression into the tool chain.

**[00:07:19 – 00:07:22]** CUDA Python also continues to evolve.

**[00:07:22 – 00:07:25]** In CUDA Python, we have really all of CUDA exposed

**[00:07:25 – 00:07:28]** in a Pythonic interface.

**[00:07:28 – 00:07:30]** We're giving you support for writing richer kernels using

**[00:07:30 – 00:07:32]** all of the features of the Python language, and then

**[00:07:32 – 00:07:35]** we're also making it easier to tune kernels written in Python.

**[00:07:35 – 00:07:38]** We're integrating support for Insight, and so you can see

**[00:07:38 – 00:07:41]** on the right here, we have Insight annotations and Insight analysis

**[00:07:41 – 00:07:46]** built into Python so that you can run a Python program, get feedback

**[00:07:46 – 00:07:49]** about why the kernel is performing the way it is, how things are

**[00:07:49 – 00:07:53]** going, how it's implemented, and effectively giving you more tools

**[00:07:53 – 00:07:57]** to optimize algorithms in place.

**[00:07:57 – 00:08:00]** We're also working quite a bit to make it, like I said, better and

**[00:08:00 – 00:08:03]** more visible for agentic workflows.

**[00:08:03 – 00:08:06]** Humans and agents tend to benefit from the same things, but agents

**[00:08:06 – 00:08:08]** can benefit from them faster.

**[00:08:08 – 00:08:09]** And one of the things that we can do is give you better

**[00:08:09 – 00:08:15]** visibility into how the code is generated and why the code was

**[00:08:15 – 00:08:16]** generated in the way that it was.

**[00:08:16 – 00:08:20]** So kind of at a first pass, we can give you annotated dumps

**[00:08:20 – 00:08:22]** about the disassembled program.

**[00:08:22 – 00:08:26]** If you take a kernel, you compile it, you decompile or disassemble

**[00:08:26 – 00:08:29]** your program into SAS, we can give you the SAS as a JSON file that

**[00:08:29 – 00:08:33]** has mappings of which particular SAS instructions came from which

**[00:08:33 – 00:08:35]** line of your higher level code.

**[00:08:35 – 00:08:37]** We're also giving you more annotations on things

**[00:08:37 – 00:08:38]** like graph node IDs.

**[00:08:38 – 00:08:40]** We're allowing you to update graphs.

**[00:08:40 – 00:08:42]** We're giving you repeatable profiling.

**[00:08:42 – 00:08:45]** Lots of different things that feed into this agentic loop.

**[00:08:45 – 00:08:47]** One of the things we see people doing a lot, and one of the

**[00:08:47 – 00:08:50]** things we do ourselves, is run these kinds of long horizon

**[00:08:50 – 00:08:54]** agentic optimization tasks, where you point an agent at a kernel.

**[00:08:54 – 00:08:56]** You say go optimize it, you spend a week or so churning

**[00:08:56 – 00:09:00]** on it and iterating, and eventually you get better results.

**[00:09:00 – 00:09:02]** The more information and the more feedback we give you

**[00:09:02 – 00:09:04]** along the way, the easier it is to make those optimizations.

**[00:09:05 – 00:09:07]** It's easier to understand why things are happening the

**[00:09:07 – 00:09:08]** way that they are.

**[00:09:08 – 00:09:11]** And this is an example of that, and I apologize, you probably

**[00:09:11 – 00:09:13]** cannot read the annotations on the chart, but let me explain

**[00:09:13 – 00:09:15]** what this is showing.

**[00:09:15 – 00:09:21]** I have on this chart agents doing optimization on QR

**[00:09:21 – 00:09:23]** factorization from PyTorch.

**[00:09:23 – 00:09:27]** So we took the QR factorization code, pointed frontier models

**[00:09:27 – 00:09:28]** at it, and said go optimize.

**[00:09:28 – 00:09:30]** And we did this in two different languages.

**[00:09:30 – 00:09:34]** Blue is CUDA C++; orange is Triton.

**[00:09:34 – 00:09:37]** And what you find is that the agents get to a good result

**[00:09:37 – 00:09:39]** in higher level languages faster.

**[00:09:39 – 00:09:42]** They can get a better result in lower level languages because they

**[00:09:42 – 00:09:43]** can spend more time optimizing.

**[00:09:43 – 00:09:45]** You get finer-grained control.

**[00:09:45 – 00:09:47]** You can do all the low-level fine-tuning.

**[00:09:47 – 00:09:50]** So the trick is, how do I get the most efficiency out of this?

**[00:09:50 – 00:09:52]** Because if you can see the numbers on the chart, it goes

**[00:09:52 – 00:09:55]** up to 266 or so on the right.

**[00:09:55 – 00:09:57]** That's hours of runtime.

**[00:09:57 – 00:09:59]** So this is approximately 10 days of runtime to get the

**[00:09:59 – 00:10:01]** result in CUDA C++.

**[00:10:01 – 00:10:05]** That's not incredibly token efficient.

**[00:10:05 – 00:10:10]** And so it translates directly to money spent, right?

**[00:10:10 – 00:10:12]** And so one of the things that we're finding internally for our

**[00:10:12 – 00:10:15]** agentic workflows, and we'd love to hear if this is bearing out for

**[00:10:15 – 00:10:18]** you as well, is that by starting in higher level languages like CUDA

**[00:10:18 – 00:10:22]** tile, like Triton, allowing the agents to iterate on and explore

**[00:10:22 – 00:10:26]** the algorithm space, you can get good performance pretty quickly.

**[00:10:26 – 00:10:30]** Within about the first eight hours, you see a very sharp

**[00:10:30 – 00:10:32]** vertical line there when we were working in Triton.

**[00:10:32 – 00:10:35]** If you take that and then translate directly over to

**[00:10:35 – 00:10:38]** CUDA C++ or something a little bit lower level, agents are very

**[00:10:38 – 00:10:41]** good at translating between one programming language and the other.

**[00:10:41 – 00:10:44]** And so the way we're thinking about CUDA these days is that

**[00:10:44 – 00:10:47]** we expose lots of different levels, let the agents move

**[00:10:47 – 00:10:49]** between those levels pretty freely.

**[00:10:49 – 00:10:52]** They're much better at doing that than humans are typically.

**[00:10:52 – 00:10:55]** And you kind of iterate until you find a local maximum in

**[00:10:55 – 00:10:57]** whatever level you're at, and then you drop to the next

**[00:10:57 – 00:11:00]** one for successive optimization.

**[00:11:00 – 00:11:02]** And we're seeing this kind of pattern play out, not just,

**[00:11:02 – 00:11:04]** I gave you one data point here from a particular kernel,

**[00:11:04 – 00:11:05]** but this is all across the board.

**[00:11:06 – 00:11:08]** This is not an unusual or cherry-picked data point.

**[00:11:08 – 00:11:10]** We just, we see this kind of thing a lot.

**[00:11:10 – 00:11:14]** And so the way that we're thinking about optimization is, again, back

**[00:11:14 – 00:11:19]** to this kind of stacked layer cake of optimization points, where you

**[00:11:19 – 00:11:22]** optimize in one, find a maximum, drop to the next one, and so on.

**[00:11:22 – 00:11:26]** And you can kind of get down to the lower levels very easily.

**[00:11:27 – 00:11:32]** We've also introduced the early stages of programming in Rust.

**[00:11:32 – 00:11:34]** So we introduced Python a couple years back; that's

**[00:11:34 – 00:11:37]** equivalent to C++ now in terms of what you can do.

**[00:11:37 – 00:11:41]** We have two front-end interfaces to Rust, CUTILE Rust and CUDA

**[00:11:41 – 00:11:43]** Oxide for SMPTE kernels.

**[00:11:43 – 00:11:45]** This is structured very similar to CUDA Python.

**[00:11:45 – 00:11:47]** Now, I will say it's early days, right?

**[00:11:47 – 00:11:48]** This is Linux only right now.

**[00:11:48 – 00:11:52]** It's not fully 100% supporting everything that's in the box

**[00:11:52 – 00:11:55]** when we talk about CUDA, but the early results are very promising.

**[00:11:55 – 00:11:58]** In addition to the memory safety of Rust that you get

**[00:11:58 – 00:12:02]** just as a function of the language, we did a research paper in

**[00:12:02 – 00:12:06]** combination with Hugging Face not too long ago where we put together

**[00:12:06 – 00:12:12]** an inference engine in Rust and compared it for relatively small,

**[00:12:12 – 00:12:17]** Pre-fill and decode throughputs to SGLang and VLLM, and the chart

**[00:12:18 – 00:12:21]** here, it's a little bit condensed, but the orange represents the time

**[00:12:21 – 00:12:25]** in Rust, left is the time to token, and the right is generated tokens

**[00:12:25 – 00:12:28]** per second, and the metrics on this are actually pretty good, and

**[00:12:28 – 00:12:32]** so it validates that the direction is good, that Rust is a viable

**[00:12:32 – 00:12:35]** language for programming these things, and importantly, you can

**[00:12:35 – 00:12:38]** take advantage of the safety on GPU side kernels, and so it can help to

**[00:12:38 – 00:12:43]** cut down on out-of-bounds accessing and these kinds of things.

**[00:12:45 – 00:12:47]** We're still continuing to invest quite heavily in Math

**[00:12:47 – 00:12:50]** Libraries and, in particular, how to get not only good performance

**[00:12:50 – 00:12:52]** out of Math Libraries but how to continue optimizing

**[00:12:52 – 00:12:56]** Math Libraries for domains where, at first glance, the GPU hardware

**[00:12:56 – 00:12:57]** may not seem to be a good fit.

**[00:12:57 – 00:13:00]** And I think FP64 is a good example of this.

**[00:13:00 – 00:13:05]** If you look at FP64 implementations in KubeLAS, we have found

**[00:13:05 – 00:13:08]** that there are techniques, and in particular Ozaki, and

**[00:13:08 – 00:13:11]** now a new iteration of the Ozaki method called Ozaki

**[00:13:11 – 00:13:15]** 2, where you can get significantly higher performance for higher

**[00:13:15 – 00:13:18]** precision matrix multiplications, or just higher precision linear

**[00:13:18 – 00:13:20]** algebra in general.

**[00:13:20 – 00:13:24]** And so, on the chart, you can't read it, I'm fairly certain,

**[00:13:24 – 00:13:27]** but the more green the color is, the more speedup there is.

**[00:13:27 – 00:13:30]** And so, with Ozaki 2, compared to the baseline implementation,

**[00:13:30 – 00:13:34]** we can get about a 3 to 4x speedup on different iterations of gems.

**[00:13:34 – 00:13:37]** And then similarly, like I mentioned, we have a lot of

**[00:13:37 – 00:13:39]** optimization techniques in play on the compile side,

**[00:13:39 – 00:13:42]** link time optimization, in particular, being one of them.

**[00:13:42 – 00:13:44]** The device side libraries really live into that, and I'll cherry

**[00:13:44 – 00:13:47]** pick cuFFTDx here for a second.

**[00:13:47 – 00:13:50]** cuFFTDx, or any of the DX libraries, are our

**[00:13:50 – 00:13:51]** device side libraries.

**[00:13:51 – 00:13:55]** You can call Math Libraries directly from within kernel code.

**[00:13:55 – 00:13:58]** All of those device-side libraries rely on link time optimization

**[00:13:58 – 00:14:00]** to fuse into the kernels that you already have.

**[00:14:00 – 00:14:03]** And this is the technique by which we can give you libraries that are

**[00:14:03 – 00:14:06]** callable on the GPU without forking off another processor, without

**[00:14:07 – 00:14:10]** incurring a back-and-forth trip to the CPU, without adding graph

**[00:14:10 – 00:14:11]** nodes, all these kinds of things.

**[00:14:11 – 00:14:14]** It just optimizes in, and from the scheduler's perspective,

**[00:14:15 – 00:14:20]** or from the GPU's perspective, it just looks like one larger kernel.

**[00:14:21 – 00:14:26]** Sparse solvers are really not well suited to GPUs, if

**[00:14:26 – 00:14:27]** we're totally honest, right?

**[00:14:27 – 00:14:30]** Every stage of doing a sparse solve is particularly

**[00:14:30 – 00:14:31]** antithetical to GPU hardware.

**[00:14:32 – 00:14:34]** The parallelism is fairly limited, it uses a lot of

**[00:14:34 – 00:14:37]** memory, there's a lot of sequential reordering and so on.

**[00:14:38 – 00:14:41]** And so, this is an area where there's still a lot of research

**[00:14:41 – 00:14:43]** into what are the most optimal techniques to do this properly,

**[00:14:43 – 00:14:47]** but it's an area where NVIDIA is investing heavily, and

**[00:14:47 – 00:14:49]** it's just that it's an example.

**[00:14:49 – 00:14:52]** We replicate this across many different libraries and many

**[00:14:52 – 00:14:54]** different parts of CUDA.

**[00:14:54 – 00:14:58]** But what we're really doing is we're working to try to bring

**[00:14:58 – 00:15:02]** forth or bring together all of the cutting-edge research on the best

**[00:15:02 – 00:15:04]** implementations of these algorithms to run on the GPU, and as

**[00:15:04 – 00:15:09]** a result, if you look at the cuDSS library, since its introduction

**[00:15:09 – 00:15:13]** in July of 2024 on the very left, we've increased the performance

**[00:15:13 – 00:15:18]** by about 5x for a solve on ISO GPU.

**[00:15:18 – 00:15:20]** So same GPU architecture, same library, just

**[00:15:20 – 00:15:22]** going forward in time.

**[00:15:22 – 00:15:25]** This library also scales to multiple GPUs, and so what

**[00:15:25 – 00:15:27]** I'm showing you on the right hand side of the slide here

**[00:15:27 – 00:15:31]** is that taking that result and putting it on four GPUs, you can

**[00:15:31 – 00:15:34]** get the solve from about five times faster to about nine times faster.

**[00:15:35 – 00:15:37]** The analysis is about the same, but we can take advantage

**[00:15:37 – 00:15:41]** of parallelism where it exists and squeeze the juice out

**[00:15:41 – 00:15:42]** of multi-GPU systems.

**[00:15:42 – 00:15:44]** And this is the kind of model for all of our libraries.

**[00:15:44 – 00:15:48]** I've cherry-picked DSS here just to show you an example.

**[00:15:48 – 00:15:50]** But this is the kind of optimization that we're doing.

**[00:15:50 – 00:15:53]** And so the specific numbers will vary from library to library.

**[00:15:53 – 00:15:55]** But the general trend for all of the libraries is that

**[00:15:55 – 00:15:58]** with each release, they get faster, they get more performant,

**[00:15:58 – 00:16:04]** and you can use the GPUs that you already have to greater effect.

**[00:16:04 – 00:16:06]** CCCL is another example of this.

**[00:16:06 – 00:16:11]** CCCL, for anyone who doesn't know, is our CUDA core compute library.

**[00:16:11 – 00:16:15]** It's a C++ or Python library implementation that drops

**[00:16:15 – 00:16:18]** into your code and contains a number of low-level parallel

**[00:16:18 – 00:16:20]** programming primitives.

**[00:16:20 – 00:16:23]** This one in particular, DeviceScan, we were able to double the

**[00:16:23 – 00:16:27]** bandwidth and therefore double the performance on Blackwell

**[00:16:27 – 00:16:29]** GPUs from one release to the next.

**[00:16:29 – 00:16:31]** And this is a zero code change.

**[00:16:31 – 00:16:34]** You continue to run; we're able to use more of the GPU

**[00:16:34 – 00:16:37]** hardware and get significantly higher throughput.

**[00:16:37 – 00:16:39]** This isn't just limited to that one function, though.

**[00:16:39 – 00:16:43]** We have k-means clustering and a number of other things that are

**[00:16:43 – 00:16:45]** more effective release to release.

**[00:16:45 – 00:16:48]** Because as we go forward in time and as new techniques

**[00:16:48 – 00:16:50]** are discovered, we're able to incorporate those in the libraries.

**[00:16:50 – 00:16:54]** You just call the function, and you can take advantage of it.

**[00:16:56 – 00:16:59]** There are a lot of other low-level optimizations we put into

**[00:16:59 – 00:17:03]** CUDA Toolkit for that last kind of 10% optimization,

**[00:17:03 – 00:17:06]** and it's sometimes a little bit cryptic when you're looking

**[00:17:07 – 00:17:09]** at the CUDA Toolkit release notes, I think, to try to figure out why

**[00:17:09 – 00:17:11]** we're doing some of these things.

**[00:17:11 – 00:17:15]** So, for example, people came to us with a need for int4-based MOE

**[00:17:15 – 00:17:19]** decode group gem, and what we found is that if we look at the tight

**[00:17:19 – 00:17:22]** loop for that gem, I'll show you another example of that specific

**[00:17:22 – 00:17:26]** thing in a moment, but if you look at that tight loop, there are

**[00:17:26 – 00:17:30]** some PTX transformations that were necessary to get the data loaded

**[00:17:30 – 00:17:33]** and get it into the right format for the Tensor cores and so on.

**[00:17:33 – 00:17:36]** By optimizing that, we were able to get about 15 to 20%

**[00:17:36 – 00:17:40]** faster implementations of that tight loop, and then similarly,

**[00:17:40 – 00:17:41]** we have bandwidth non-copy kernels.

**[00:17:41 – 00:17:43]** We can add L1 prefetching.

**[00:17:43 – 00:17:46]** That'll get you from 70% to 90% of peak bandwidth.

**[00:17:46 – 00:17:49]** And this kind of goes on and on, but the point is that we're always

**[00:17:49 – 00:17:52]** looking at low-level optimizations that can then feed forward

**[00:17:52 – 00:17:56]** into higher-level optimizations.

**[00:17:56 – 00:18:00]** Double-clicking on that particular PTX example here, in the critical

**[00:18:01 – 00:18:04]** path or in the tight loop for that group gem, what happens is

**[00:18:04 – 00:18:08]** you load int4 values from memory, and int4 is really attractive from

**[00:18:08 – 00:18:11]** a memory bandwidth perspective, because being four bits, it's

**[00:18:11 – 00:18:13]** very efficient in that sense.

**[00:18:13 – 00:18:15]** But to actually get it onto the Tensor Core, in this particular

**[00:18:16 – 00:18:19]** case, there was an int4 to BF16 upcast in the critical

**[00:18:19 – 00:18:22]** path of the tightest loop.

**[00:18:22 – 00:18:25]** And so we were able to analyze that and add new PTX instructions

**[00:18:25 – 00:18:29]** that the compiler can generate, and that the particular instruction

**[00:18:29 – 00:18:32]** I'm talking about here is on the slide, but effectively

**[00:18:32 – 00:18:36]** what that was able to do is cut it down from 13 instructions to 4.

**[00:18:36 – 00:18:39]** And by cutting down from 13 to 4, that's where that 15

**[00:18:39 – 00:18:41]** to 20% speedup comes from.

**[00:18:41 – 00:18:44]** And this is a new optimization in 13.4, but really every

**[00:18:44 – 00:18:46]** release has little things like this where we're always

**[00:18:46 – 00:18:51]** kind of polishing and continuing to try to make it easier to use.

**[00:18:52 – 00:18:58]** Looking at the system kind of one step removed, right,

**[00:18:58 – 00:19:03]** the GPU by itself is generally speaking for many applications

**[00:19:03 – 00:19:04]** not the sole unit of compute.

**[00:19:04 – 00:19:06]** You're not just writing a kernel that's going to run

**[00:19:06 – 00:19:08]** on a particular GPU.

**[00:19:08 – 00:19:11]** You need to often move data around, whether it's on the same

**[00:19:11 – 00:19:15]** GPU, between GPUs in the same node, or between GPUs on remote nodes.

**[00:19:15 – 00:19:17]** And so I want to introduce, in case you're not familiar

**[00:19:17 – 00:19:19]** with it, a piece of hardware that exists on the GPU called the copy

**[00:19:20 – 00:19:24]** engine, copy engines, the NVIDIA term for a DMA engine, effectively.

**[00:19:24 – 00:19:28]** And the point of the optimization is that SMs are very good

**[00:19:28 – 00:19:29]** at computing things.

**[00:19:29 – 00:19:30]** You want to keep them busy.

**[00:19:30 – 00:19:33]** You want to keep them calculating tensor operations

**[00:19:33 – 00:19:36]** or scalar arithmetic or whatever they're doing.

**[00:19:36 – 00:19:38]** When you're moving data around, you want to hand it off to

**[00:19:38 – 00:19:41]** dedicated hardware, and we want to make it as easy as possible

**[00:19:41 – 00:19:44]** for you to do that so that the copy engines can move the data while

**[00:19:44 – 00:19:47]** the SMs are computing and we can orchestrate it so that everything

**[00:19:48 – 00:19:50]** is engaged at the same time.

**[00:19:50 – 00:19:53]** The point is that if an SM is moving your data around, it's

**[00:19:53 – 00:19:55]** not doing something productive.

**[00:19:55 – 00:19:58]** And here's an example, again, of MOE, just because MOE is

**[00:19:58 – 00:20:00]** a fairly popular topic these days.

**[00:20:00 – 00:20:03]** If you're doing SM-based communication, which is

**[00:20:03 – 00:20:05]** what a lot of people see out of the box by default,

**[00:20:05 – 00:20:09]** it's like expert gem, routing, expert gem, combine, and so on.

**[00:20:09 – 00:20:11]** The point is what you see on the bottom, where we can

**[00:20:11 – 00:20:16]** offload the movement of data from the compute, and then

**[00:20:16 – 00:20:20]** as a result, we can overall, in aggregate, spend less time.

**[00:20:21 – 00:20:24]** And so to do that, in CUDA 13, we've been adding a lot

**[00:20:24 – 00:20:29]** of capability to extend the existing memory movement APIs

**[00:20:29 – 00:20:31]** to tell them to use copy engines.

**[00:20:31 – 00:20:34]** And the way that this works, you just effectively set a flag.

**[00:20:34 – 00:20:38]** I've got a code example here in C++; it's very similar in Python.

**[00:20:38 – 00:20:42]** But you set the flag, you submit the transfer, and then it's

**[00:20:42 – 00:20:43]** just offloaded to the copy engine.

**[00:20:43 – 00:20:46]** You can synchronize these things and so on as you can with

**[00:20:46 – 00:20:47]** any kind of asynchronous operation.

**[00:20:48 – 00:20:51]** But it keeps computing on the SM while the data is

**[00:20:51 – 00:20:52]** moving somewhere else.

**[00:20:52 – 00:20:54]** And then we've got a lot of other kind of micro-optimizations

**[00:20:54 – 00:20:57]** that come into the mix too, like non-batch mem copies, indirect

**[00:20:57 – 00:21:00]** copies, all these kinds of things.

**[00:21:00 – 00:21:05]** When we start to scale out to larger GPUs, anyone who's familiar

**[00:21:05 – 00:21:07]** with how we've done multi-node communications in the past

**[00:21:07 – 00:21:12]** is probably familiar with the way that we map virtual memory pointers

**[00:21:12 – 00:21:15]** to memory addresses on remote GPUs.

**[00:21:15 – 00:21:19]** And this comes with kind of two drawbacks.

**[00:21:19 – 00:21:23]** Pointers are fairly easy to use, but there is no error

**[00:21:23 – 00:21:25]** reporting mechanism for a pointer.

**[00:21:25 – 00:21:27]** If you access a pointer and there's a cosmic ray that hits your

**[00:21:27 – 00:21:32]** rack and the memory is corrupted, it's not an error that's propagated

**[00:21:32 – 00:21:34]** up the stack; it's really just undefined behavior in the

**[00:21:34 – 00:21:38]** application, and the usual result of that is an application crash.

**[00:21:38 – 00:21:42]** It's also not possible to really keep tabs on which

**[00:21:42 – 00:21:44]** data is moving where and so on.

**[00:21:44 – 00:21:47]** So the long story short here is that we're moving towards

**[00:21:47 – 00:21:50]** a new model of programming for multi-node communications where

**[00:21:50 – 00:21:53]** instead of doing pointer-based accesses, we're doing more of

**[00:21:53 – 00:21:59]** an API-based get put kind of access to remote GPUs where you specify

**[00:21:59 – 00:22:03]** a logical endpoint, an amount of data to copy, and the data itself.

**[00:22:03 – 00:22:08]** So it's basically put this data to GPU 17 and so on.

**[00:22:08 – 00:22:11]** As a result of that, if there's an error that happens during

**[00:22:11 – 00:22:14]** the process, the API can return an error code, your application

**[00:22:14 – 00:22:17]** can respond to the error, we may be able to retry all

**[00:22:17 – 00:22:18]** these kinds of things.

**[00:22:18 – 00:22:22]** Also, as a result of that, we're able to use GPU hardware that

**[00:22:22 – 00:22:24]** was kind of dark before, right?

**[00:22:24 – 00:22:26]** The GPU has the ability to count the writes, and so you can know

**[00:22:26 – 00:22:29]** when your data has landed, you can, on the remote GPU, keep tabs on

**[00:22:29 – 00:22:33]** things, know when all your data has arrived, all these kinds of things.

**[00:22:33 – 00:22:35]** And so we're migrating the lower levels of the

**[00:22:35 – 00:22:37]** multi-node communication stack to something we're

**[00:22:37 – 00:22:39]** calling compute fabric transport.

**[00:22:39 – 00:22:41]** Now, if you're using something higher level, like Nickel

**[00:22:41 – 00:22:45]** or NVSHMEM or Nixle or so on, this is all gonna be behind the scenes.

**[00:22:45 – 00:22:49]** But what it effectively does is it makes those APIs more performant

**[00:22:49 – 00:22:53]** and it makes them more resilient.

**[00:22:54 – 00:22:57]** Communications is an area where there's a lot of stuff

**[00:22:57 – 00:23:00]** happening at the very low levels of the stack, and it

**[00:23:00 – 00:23:06]** can be, I think, very abstract when we're trying to map what we're

**[00:23:06 – 00:23:09]** doing in the low levels of CUDA to how it applies at higher levels

**[00:23:09 – 00:23:10]** for communications libraries.

**[00:23:10 – 00:23:12]** And so I wanted to put this slide together just

**[00:23:12 – 00:23:14]** to show you an example.

**[00:23:14 – 00:23:16]** There's a lot of stuff that goes into each release that,

**[00:23:16 – 00:23:19]** if you look at the release notes, is very granular.

**[00:23:19 – 00:23:23]** But what it feeds forward into is the ability for the communications

**[00:23:23 – 00:23:26]** APIs or the libraries to do more interesting work.

**[00:23:26 – 00:23:29]** So, for example, copy engines can write the multicast memory.

**[00:23:29 – 00:23:31]** Some of you may know what that means, but I think many

**[00:23:31 – 00:23:33]** of you would look at that and say, I don't know what that means, it

**[00:23:33 – 00:23:36]** probably doesn't apply to me, but what it allows you to do is zero SM

**[00:23:36 – 00:23:40]** copy engine collectives in nickel, or batch memcopy, being able

**[00:23:40 – 00:23:43]** to prefer copy engine overlap, that lets you do better overlapping.

**[00:23:44 – 00:23:46]** Symmetric memory kernels, all these higher level things are

**[00:23:46 – 00:23:51]** enabled by the low level granular stuff that goes into CUDA Toolkit.

**[00:23:51 – 00:23:55]** There's also, in addition to NICL and in addition to NVSHMEM, a

**[00:23:55 – 00:23:58]** new communications API that NVIDIA has come up with called Nixle,

**[00:23:58 – 00:24:02]** and it's a transport agnostic API for direct send and receive.

**[00:24:02 – 00:24:04]** The transport agnostic part is really the key differentiator

**[00:24:04 – 00:24:06]** here versus something like NICL.

**[00:24:06 – 00:24:09]** They, kind of at the 30,000-foot view, do similar things.

**[00:24:09 – 00:24:13]** But what Nixle does is it's really intended for moving KV cache

**[00:24:13 – 00:24:17]** between GPUs that are dedicated to pre-fill and decode, and again,

**[00:24:17 – 00:24:18]** in a transport agnostic manner.

**[00:24:18 – 00:24:23]** And that's really the critical piece of this whole thing.

**[00:24:24 – 00:24:26]** All right, and then finally, as we're looking at the optimizations,

**[00:24:26 – 00:24:30]** we're trying to keep all of the GPUs productive.

**[00:24:30 – 00:24:33]** We're trying to keep all the GPUs, much like we're doing

**[00:24:33 – 00:24:35]** at the single GPU level, much like we're doing at the small-scale

**[00:24:35 – 00:24:38]** multi-GPU level, as we scale out, it's the same problem.

**[00:24:38 – 00:24:43]** How do I keep all these things engaged and doing usable work?

**[00:24:43 – 00:24:47]** And so, starting at the single GPU level, we're giving you lots

**[00:24:47 – 00:24:50]** of low-level scheduling control.

**[00:24:50 – 00:24:52]** Now, Green Context is a good example of that.

**[00:24:52 – 00:24:54]** There are many other techniques or many other technologies

**[00:24:54 – 00:24:57]** that we're putting into CUDA Toolkit, but this is one that

**[00:24:57 – 00:25:01]** is the foundation for a lot of the work that's coming online now.

**[00:25:01 – 00:25:03]** Now, this one's not actually new.

**[00:25:03 – 00:25:06]** Green Context had been around since CUDA 12.4, but because

**[00:25:06 – 00:25:09]** it's so useful for fine-grained scheduling control, we're

**[00:25:09 – 00:25:11]** putting a lot of effort into optimizing it and upgrading

**[00:25:11 – 00:25:13]** it as we go through CUDA 13.

**[00:25:13 – 00:25:17]** What green context effectively does is it allows you to subdivide

**[00:25:17 – 00:25:21]** or segment the GPU within the scope of a user space application.

**[00:25:21 – 00:25:24]** So you create a CUDA context; within that context you say,

**[00:25:24 – 00:25:29]** I want to dedicate a region of the GPU for this set of workloads,

**[00:25:29 – 00:25:32]** I want to dedicate a region of the GPU for that set of workloads.

**[00:25:32 – 00:25:35]** And when I say a region, it's a collection of SMs, it's

**[00:25:35 – 00:25:37]** an amount of memory and so on.

**[00:25:37 – 00:25:40]** And sort of the canonical example is that you may have

**[00:25:40 – 00:25:43]** a single GPU that's dedicated to pre-fill and decode streams,

**[00:25:43 – 00:25:46]** and you want to make sure that there are a certain number

**[00:25:46 – 00:25:50]** of SMs dedicated to decode, while the rest of the GPU can be used for

**[00:25:50 – 00:25:53]** pre-fill or some other workload.

**[00:25:53 – 00:25:56]** So we've been adding a lot into green contexts.

**[00:25:56 – 00:26:01]** And then this kind of feeds forward into how we're able

**[00:26:01 – 00:26:02]** to schedule things on the GPU.

**[00:26:02 – 00:26:05]** So there are lots of other low-level scheduling techniques

**[00:26:05 – 00:26:06]** that are in flight.

**[00:26:06 – 00:26:11]** You'll hear in recent releases about locality domains, which

**[00:26:11 – 00:26:13]** is a way to subdivide the GPU.

**[00:26:13 – 00:26:17]** You'll hear about things like subgrid scheduling and so on.

**[00:26:17 – 00:26:20]** These are all techniques that build on top of Green Context

**[00:26:20 – 00:26:23]** to give you more control at a fine-grained level about

**[00:26:23 – 00:26:27]** where Things are running on the GPU to try to keep things together

**[00:26:27 – 00:26:31]** when it gets to actual launch time.

**[00:26:31 – 00:26:34]** Now we've added a lot of control from the CPU side about how

**[00:26:34 – 00:26:35]** work orchestrates.

**[00:26:35 – 00:26:37]** We're giving you launch attributes that control

**[00:26:37 – 00:26:38]** how the work is executed.

**[00:26:38 – 00:26:42]** We're giving you More CPU and in particular Grace and

**[00:26:42 – 00:26:45]** Vera where API is for layout.

**[00:26:45 – 00:26:47]** We're giving you deterministic launch.

**[00:26:47 – 00:26:52]** This is really important in domains where latency is important, from

**[00:26:52 – 00:26:55]** the perspective of determinism, so let's say, for instance,

**[00:26:55 – 00:26:59]** that you are in a domain where you can't tolerate a lot of

**[00:27:00 – 00:27:02]** jitter in terms of how long it takes to launch a kernel.

**[00:27:02 – 00:27:05]** You can optimize and work around a known latency, but

**[00:27:05 – 00:27:07]** what you can't deal with is a latency that's always changing.

**[00:27:07 – 00:27:10]** This is very frequent in, say, telecoms or robotics or

**[00:27:10 – 00:27:14]** these kinds of applications where there's a real-time component.

**[00:27:14 – 00:27:16]** We give you the ability to pre-allocate stack

**[00:27:16 – 00:27:18]** memory at launch time.

**[00:27:18 – 00:27:22]** We give the ability to do things like just generally

**[00:27:22 – 00:27:26]** control where memory is allocated so it's not on the critical

**[00:27:26 – 00:27:28]** path, so you don't see that jitter.

**[00:27:28 – 00:27:30]** And then we're also doing a lot within the driver itself

**[00:27:30 – 00:27:34]** to reduce contended mutexes and things like that that are

**[00:27:34 – 00:27:39]** just sources of jitter or sources of non-determinism in the launch.

**[00:27:39 – 00:27:43]** We are also moving towards things like Automatic Dependent Launch.

**[00:27:43 – 00:27:45]** Automatic Dependent Launch is an automation of something called

**[00:27:45 – 00:27:47]** Programmatic Dependent Launch.

**[00:27:47 – 00:27:50]** What Programmatic Dependent Launch is, is it's a technique where

**[00:27:50 – 00:27:54]** you can effectively signal to the scheduler on the GPU that a set of

**[00:27:54 – 00:27:57]** kernels are related to one another.

**[00:27:57 – 00:28:00]** And so I'll show you on the picture here.

**[00:28:00 – 00:28:03]** We have two kernels, kernel A and kernel B, and this is effectively

**[00:28:03 – 00:28:06]** a producer-consumer relationship in this trivial example.

**[00:28:06 – 00:28:10]** Kernel A is writing some data, and the sort of historical way that

**[00:28:10 – 00:28:13]** you would do this is you would put kernel A into a stream, let it run,

**[00:28:13 – 00:28:18]** put kernel B into the stream right after it, and there is always a gap

**[00:28:18 – 00:28:19]** between kernels when you launch.

**[00:28:19 – 00:28:23]** And then, in addition to that gap, kernel B probably has some setup it

**[00:28:23 – 00:28:26]** does, it's gonna load some weights, it's gonna initialize some register

**[00:28:26 – 00:28:28]** values, these kinds of things.

**[00:28:28 – 00:28:33]** With PDL, or now ADL, what you can do is, as you launch

**[00:28:33 – 00:28:37]** these kernels, you can signal to the scheduler that they're related.

**[00:28:37 – 00:28:42]** And from within the kernel, you can specify in kernel

**[00:28:42 – 00:28:44]** A when the data is produced.

**[00:28:44 – 00:28:46]** And so effectively what happens is the kernels get scheduled at

**[00:28:46 – 00:28:51]** the same time; B can set itself up and be ready to go, and then just

**[00:28:51 – 00:28:52]** waiting for the data to arrive.

**[00:28:52 – 00:28:55]** A can signal to B that the data is there, and then the

**[00:28:55 – 00:28:58]** scheduler can kick off B right away with the cost of the setup

**[00:28:58 – 00:29:02]** kind of amortized over the lifetime of A, and that results overall in

**[00:29:02 – 00:29:03]** a pretty substantial time savings.

**[00:29:03 – 00:29:07]** For me, it is fairly simple.

**[00:29:07 – 00:29:10]** Some GPUs have the ability to do this, in particular,

**[00:29:10 – 00:29:12]** Hopper and newer; older GPUs don't.

**[00:29:12 – 00:29:15]** But if you use these APIs on older GPUs, it doesn't

**[00:29:15 – 00:29:16]** change the execution.

**[00:29:16 – 00:29:18]** It's kind of a no-op. So it's sort of free to drop it in.

**[00:29:18 – 00:29:23]** And for most things, it's a little bit of free performance for you.

**[00:29:23 – 00:29:25]** Now, I mentioned locality domains.

**[00:29:25 – 00:29:29]** Locality domains are another extension of controlling where

**[00:29:30 – 00:29:31]** work is running on the GPU.

**[00:29:31 – 00:29:34]** And the use of this, I think, is fairly intuitive.

**[00:29:34 – 00:29:39]** If you have data that migrates between the SMs and the memory,

**[00:29:39 – 00:29:43]** that's latency that the application incurs, and it's power.

**[00:29:43 – 00:29:46]** Anytime you're moving bits around, it costs more power.

**[00:29:46 – 00:29:48]** As the GPU dies, they're going fairly large.

**[00:29:48 – 00:29:49]** You can go out on the show floor and see some.

**[00:29:49 – 00:29:52]** I mean, they're like dinner plates sized almost, it

**[00:29:52 – 00:29:53]** feels like these days.

**[00:29:53 – 00:29:56]** You can sort of intuitively imagine that going from one

**[00:29:56 – 00:30:00]** corner of the GPU out to memory from the other corner of the GPU

**[00:30:00 – 00:30:03]** is not as fast as going to memory that's co-located with the SM.

**[00:30:04 – 00:30:06]** And so locality domains allows you to split the GPU into

**[00:30:06 – 00:30:08]** a number of subdomains.

**[00:30:08 – 00:30:12]** Those subdomains, then, when you enqueue a piece of work

**[00:30:12 – 00:30:16]** into that subdomain, it only runs in a particular area of the GPU.

**[00:30:16 – 00:30:19]** When you allocate memory, it only allocates in memory

**[00:30:19 – 00:30:21]** controllers that are co-located to that part of the GPU.

**[00:30:21 – 00:30:24]** This is not a technology like MIG, where you're really

**[00:30:24 – 00:30:26]** segmented and you're not able to communicate between these.

**[00:30:27 – 00:30:30]** You're still fully able to access everything, but automatically,

**[00:30:30 – 00:30:35]** by default, your work will go into the same place as the other work.

**[00:30:35 – 00:30:39]** And so we've been applying this to kernels, just in general,

**[00:30:39 – 00:30:41]** on out-of-the-box GPUs of today.

**[00:30:41 – 00:30:48]** And what we tend to find, in most cases, if you're able

**[00:30:48 – 00:30:53]** to fit the execution into one locality domain and or you're able

**[00:30:53 – 00:30:55]** to take that kernel and sort of separate it into something that's

**[00:30:55 – 00:30:59]** going to run in locality domain 0 and 1, you'll get about a 2% to

**[00:30:59 – 00:31:04]** 9% speedup in the overall execution time of that kernel, just by having

**[00:31:04 – 00:31:06]** the memory and the data co-located.

**[00:31:07 – 00:31:10]** And so it's actually a really powerful technique, just keeping

**[00:31:10 – 00:31:11]** things close together.

**[00:31:11 – 00:31:15]** I wouldn't necessarily, with any of these techniques, recommend

**[00:31:15 – 00:31:17]** that you do it for every single kernel or every single workload

**[00:31:17 – 00:31:19]** or anything like that, but there's just tools in the

**[00:31:19 – 00:31:24]** toolbox to allow you or your agent to go and iteratively optimize.

**[00:31:26 – 00:31:27]** If we...

**[00:31:27 – 00:31:29]** I'll totally change gears here for one second.

**[00:31:29 – 00:31:34]** When we talk about data movement and so on, when we're orchestrating

**[00:31:34 – 00:31:36]** in the data center, one of the big challenges is how

**[00:31:36 – 00:31:39]** do we keep the GPUs alive, right?

**[00:31:39 – 00:31:42]** How do we understand what's happening in the GPUs, which

**[00:31:42 – 00:31:43]** GPUs are good to go?

**[00:31:43 – 00:31:45]** At a single GPU scale, this doesn't matter very much.

**[00:31:45 – 00:31:47]** At a scale of like tens of thousands or hundreds

**[00:31:47 – 00:31:50]** of thousands of GPUs, this starts to matter a lot, because there's

**[00:31:51 – 00:31:54]** always something interesting happening with the system.

**[00:31:54 – 00:31:57]** And so we've been adding throughout the lifetime of CUDA 13 lots

**[00:31:57 – 00:32:01]** of techniques to give you better visibility into what's

**[00:32:01 – 00:32:03]** happening with the GPUs and and if something bad does

**[00:32:04 – 00:32:07]** happen, you get an uncorrectable ECC error or something, getting

**[00:32:07 – 00:32:08]** better attribution for it.

**[00:32:08 – 00:32:12]** So we've added heartbeats, we've added state monitoring, we've given

**[00:32:12 – 00:32:16]** additional XIDs in much more detail into what's happening where, and

**[00:32:16 – 00:32:20]** then we're also leaning into error reporting mechanisms like CPER.

**[00:32:20 – 00:32:24]** We've then enhanced the NVIDIA SMI and NVML APIs to give you better

**[00:32:24 – 00:32:27]** visibility and access into that.

**[00:32:27 – 00:32:30]** We're also leaning much more into GPU checkpoint and restore

**[00:32:30 – 00:32:34]** to get this kind of virtuous cycle of resiliency in place.

**[00:32:35 – 00:32:38]** We can detect errors better now; we have abilities to

**[00:32:38 – 00:32:41]** test and place GPUs to make sure it was a transient error

**[00:32:41 – 00:32:43]** and not something more systemic.

**[00:32:43 – 00:32:46]** In many cases, we can repair these errors with online TPC repairs,

**[00:32:46 – 00:32:49]** and then between checkpoint and restore we're able to

**[00:32:49 – 00:32:51]** get you back up and running faster.

**[00:32:51 – 00:32:55]** Checkpoint and restore is great for warm start; it's also great for

**[00:32:55 – 00:32:59]** just recovering from an error that may happen on a long running job.

**[00:32:59 – 00:33:01]** CheckPoint and Restore, we're adding a lot of capability to

**[00:33:01 – 00:33:05]** it for multi-GPU, for inter-process communications, all these

**[00:33:05 – 00:33:08]** different things, including save to disk directly.

**[00:33:08 – 00:33:10]** We're just generally trying to make the CheckPoint and

**[00:33:10 – 00:33:13]** Restore workflow as resilient and solid as it can be.

**[00:33:13 – 00:33:17]** We're always adding or we're also adding always on profiling at

**[00:33:17 – 00:33:20]** scale for larger GPU deployments.

**[00:33:20 – 00:33:23]** So this is a technique where we can, with very, very low

**[00:33:23 – 00:33:26]** overhead, almost undetectable, we can instrument the driver,

**[00:33:26 – 00:33:28]** and then across a fleet of systems, we can give you really

**[00:33:28 – 00:33:32]** good metrics for how things are operating, what's happening.

**[00:33:32 – 00:33:36]** And so we can give you this insight, systems level diagnostics.

**[00:33:36 – 00:33:39]** What's moving across NVLink and when, when is thing, when

**[00:33:39 – 00:33:41]** our kernel is executing?

**[00:33:41 – 00:33:43]** When do we have bottlenecks in communication

**[00:33:43 – 00:33:46]** between GPUs and so on?

**[00:33:46 – 00:33:51]** This kind of fills a gap in the offering between the always-on but

**[00:33:51 – 00:33:56]** very high-level profiling of DCGM to the kind of lower-level single

**[00:33:56 – 00:33:59]** GPU profiling of Insight Systems.

**[00:33:59 – 00:34:03]** Now we can give you sort of cluster-scale always-on monitoring.

**[00:34:03 – 00:34:06]** And then as we look forward to where we're going, we think

**[00:34:06 – 00:34:09]** tile programming or higher level programming abstractions

**[00:34:09 – 00:34:13]** in general are continuing to become more ubiquitous, as the compilation

**[00:34:13 – 00:34:17]** stick gets more capable and more mature and is more optimal, it'll

**[00:34:17 – 00:34:19]** become easier and easier to use.

**[00:34:19 – 00:34:21]** I showed you a lot of performance examples at the beginning,

**[00:34:21 – 00:34:24]** we're just going to continue going forward on that.

**[00:34:24 – 00:34:26]** Communication is the first class part of the kernel.

**[00:34:26 – 00:34:29]** We're adding communication support natively into Tile.

**[00:34:29 – 00:34:34]** We are looking at technologies to fuse kernels together, so you

**[00:34:34 – 00:34:36]** can have a communications kernel and a compute kernel and look at

**[00:34:37 – 00:34:40]** scheduling and graph optimization and these kinds of things.

**[00:34:40 – 00:34:43]** More automated performance out of the box and then more

**[00:34:43 – 00:34:44]** durability at scale.

**[00:34:44 – 00:34:48]** It's really important that we are as reliable as possible

**[00:34:48 – 00:34:51]** at data center scales and that we keep improving performance

**[00:34:51 – 00:34:53]** even for older GPU architectures.

**[00:34:53 – 00:34:55]** So that's pretty much it.

**[00:34:55 – 00:34:56]** I have time for a couple of questions, and then we also

**[00:34:56 – 00:35:00]** have some connect with experts sessions throughout the rest

**[00:35:00 – 00:35:02]** of the day where myself and some of my colleagues will be

**[00:35:02 – 00:35:05]** around to answer any questions that came up or that may have occurred

**[00:35:05 – 00:35:06]** to you as part of the session.

**[00:35:06 – 00:35:09]** I also have some QR codes on the slide here with links

**[00:35:09 – 00:35:12]** to just some of the documentation, the programming guide for

**[00:35:12 – 00:35:14]** CUDA that has a lot of information about the new stuff in it, the

**[00:35:14 – 00:35:18]** release notes for 13.4, CUDA-style Python, and some of the other

**[00:35:18 – 00:35:22]** technologies that we talked about during the overall session here.

**[00:35:22 – 00:35:25]** But with that, that's effectively the talk.

**[00:35:25 – 00:35:27]** So thank you very much.

**[00:35:28 – 00:35:30]** Thank you very much Rob.

**[00:35:30 – 00:35:32]** So, questions?

**[00:35:32 – 00:35:35]** Who has the first question?

**[00:35:38 – 00:35:41]** Ah, wait.

**[00:35:45 – 00:35:49]** How are decisions made about which kernels can be fused

**[00:35:49 – 00:35:51]** together and which cannot?

**[00:35:53 – 00:35:55]** I'm not sure I exactly understand the intent of the question.

**[00:35:55 – 00:35:59]** So when we're doing link time optimization, there's

**[00:35:59 – 00:36:03]** a developer-indicated intent to try to fuse these kernels together.

**[00:36:03 – 00:36:07]** When we're looking at other technologies for kernel fusions

**[00:36:07 – 00:36:10]** that may exist, like in the MLIR layer, let's say, there

**[00:36:10 – 00:36:13]** are compiler optimization passes in development where

**[00:36:13 – 00:36:16]** you can describe a bunch of smaller kernels and either put them

**[00:36:16 – 00:36:19]** in a graph relationship directly, or you can just feed them all into

**[00:36:19 – 00:36:23]** the compiler and the compiler can look for optimizations for fusions.

**[00:36:23 – 00:36:26]** But generally speaking today, the decisions about when to try to fuse

**[00:36:26 – 00:36:30]** kernels are driven by developer directives as opposed to things

**[00:36:30 – 00:36:31]** that are happening automatically.

**[00:36:31 – 00:36:34]** We want to try to do more optimization in the future

**[00:36:34 – 00:36:39]** to find opportunities naturally to fuse things.

**[00:36:41 – 00:36:43]** Some more questions? Oh, perfect.

**[00:36:43 – 00:36:45]** I will come around.

**[00:36:45 – 00:36:49]** Let me run across the room for you.

**[00:36:52 – 00:36:55]** So thank you very much for this great presentation.

**[00:36:55 – 00:36:57]** I have a question regarding determinism.

**[00:36:57 – 00:37:02]** So how deterministic is it, or can we make it deterministic?

**[00:37:03 – 00:37:04]** So it's a good question.

**[00:37:04 – 00:37:09]** The GPU hardware is inherently not deterministic, so there's

**[00:37:09 – 00:37:12]** always going to be some amount of non-determinism.

**[00:37:12 – 00:37:16]** So our goal in the CUDA layers is to try to make that non-determinism

**[00:37:16 – 00:37:18]** as minimal as it can be.

**[00:37:19 – 00:37:22]** Some sources of that are just the jitter between the CPU and the GPU.

**[00:37:23 – 00:37:26]** The scheduler itself on the GPU is a hardware mechanism, and

**[00:37:26 – 00:37:31]** so you don't necessarily have the best control over kernel execution.

**[00:37:31 – 00:37:33]** And what I really mean by that is that when you enqueue

**[00:37:33 – 00:37:38]** a CTA to run on a particular SM, there is no preemption mechanism.

**[00:37:38 – 00:37:40]** That particular CTA will run until completion, and so if

**[00:37:40 – 00:37:43]** the CTA itself is inherently non-deterministic in some way,

**[00:37:43 – 00:37:46]** like it's waiting on a semaphore or there's interthread communications

**[00:37:46 – 00:37:50]** or something, something like this, you can find impacts from it.

**[00:37:50 – 00:37:54]** So where we're trying to make it more deterministic is, for example,

**[00:37:54 – 00:37:59]** trying to remove any allocations or changes that can happen

**[00:37:59 – 00:38:00]** in the critical path during launch.

**[00:38:00 – 00:38:03]** I mentioned replacing some mutexes with spinlocks or

**[00:38:03 – 00:38:08]** getting memory allocations that can happen pre-complete.

**[00:38:08 – 00:38:10]** One example that we just added recently in 13.4 is

**[00:38:10 – 00:38:14]** that you can pre-allocate the stack for the kernel.

**[00:38:14 – 00:38:17]** So instead of having a dynamically growing stack where it might,

**[00:38:17 – 00:38:19]** it doesn't consume time for memory allocations, you can

**[00:38:19 – 00:38:22]** just pre-allocate everything at the beginning.

**[00:38:23 – 00:38:26]** But there is inherently some non-determinism in the GPU.

**[00:38:27 – 00:38:31]** It's not a hard real-time processor.

**[00:38:32 – 00:38:36]** Okay, we have time for this last question.

**[00:38:36 – 00:38:40]** Thank you for these great updates and great progress with CUDA.

**[00:38:40 – 00:38:44]** And I have a question on this slide with the agentic optimization

**[00:38:44 – 00:38:50]** for like CUDA C++ versus Python and more like... No.

**[00:38:50 – 00:38:51]** Less... This one?

**[00:38:51 – 00:38:54]** Yeah, that one.

**[00:38:54 – 00:38:57]** How that would look in the future?

**[00:38:57 – 00:39:03]** Is CUDA C++ going to be still the top-notch

**[00:39:03 – 00:39:08]** choice if you want to write high-performance productive code?

**[00:39:08 – 00:39:12]** This is an interesting question, and it's almost

**[00:39:12 – 00:39:14]** Pascal's wager, I think.

**[00:39:14 – 00:39:17]** There's a group of people who thinks that agents will directly

**[00:39:17 – 00:39:23]** write in PTX or SAS, and it'll be able to do full optimization there.

**[00:39:23 – 00:39:24]** That may happen in the future.

**[00:39:24 – 00:39:26]** It's not the case right now.

**[00:39:26 – 00:39:28]** What we find is that there's a much busier version of this

**[00:39:28 – 00:39:30]** chart that I didn't put on the slide here where we're showing

**[00:39:31 – 00:39:34]** lots of different interfaces.

**[00:39:34 – 00:39:36]** The general trend is, at the higher level the interface

**[00:39:36 – 00:39:40]** is, the faster the agent gets to whatever the maximum performance

**[00:39:40 – 00:39:42]** for that layer is.

**[00:39:42 – 00:39:45]** You can generally speaking get a little bit more performance

**[00:39:45 – 00:39:49]** the closer you are to the metal, and so in a future world where

**[00:39:49 – 00:39:54]** agents are able to just reason in ptx and write entire kernels

**[00:39:54 – 00:39:59]** very quickly, then the need for a lot of these things may go away.

**[00:39:59 – 00:40:04]** Currently where we are now with current technology, it takes quite

**[00:40:04 – 00:40:09]** a long time for them to optimize performance, even at the C++ level.

**[00:40:09 – 00:40:10]** And then if you're dropping down to PTX, it's even

**[00:40:10 – 00:40:11]** substantially longer.

**[00:40:11 – 00:40:14]** The reason I didn't put PTX on this chart is it just completely blows

**[00:40:14 – 00:40:16]** out the scale for everything else.

**[00:40:16 – 00:40:19]** So you can do it and agents can work there, but we find

**[00:40:19 – 00:40:22]** that it's more productive to start at something higher

**[00:40:22 – 00:40:25]** level and then drop and then drop and kind of iteratively

**[00:40:25 – 00:40:29]** get closer to the metal for fine-tuning, as opposed to starting

**[00:40:29 – 00:40:34]** with agents optimizing something like PTX or lower level than that.

**[00:40:34 – 00:40:36]** It's uh, it's interesting though.

**[00:40:36 – 00:40:38]** I I myself am very curious how that's going to play out.

**[00:40:38 – 00:40:41]** I talked to people every day who are trying different things

**[00:40:41 – 00:40:44]** and experimenting, and some of the results are really surprising.

**[00:40:44 – 00:40:46]** So if you were asking me like which one of these is going

**[00:40:46 – 00:40:50]** to be the only way to program in two years, I have no idea.

**[00:40:50 – 00:40:53]** My goal right now is to make them all as efficient as they can be,

**[00:40:53 – 00:40:56]** and then we'll see how it evolves.

**[00:40:56 – 00:40:58]** Well, everyone, thank you very much.

**[00:40:58 – 00:41:02]** Thank you, Rob, for the amazing presentation.

**[00:41:02 – 00:41:04]** And I wish everyone a fantastic NVIDIA GTC.

**[00:41:04 – 00:41:05]** Have a nice day.

