正在加载视频...

视频加载失败

I used to find writing CUDA code rather terrifying. But then I discovered a couple of tricks that actually make it quite accessible. In this video I introduce CUDA in a way that will be accessible to Python programmers, and I even show how to do it all in Colaboratory!

210,674 次观看 • 2 年前 •via X (Twitter)

10 条评论

Jeremy Howard 的头像
Jeremy Howard2 年前

Here's GPT4's summary of the video: In this comprehensive video tutorial, Jeremy Howard from demystifies the process of programming NVIDIA GPUs using CUDA, and simplifies the perceived complexities of CUDA programming. Jeremy emphasizes the accessibility of CUDA, especially when combined with PyTorch's capabilities, allowing for programming directly in notebooks rather than traditional compilers and terminals. To make CUDA more approachable to Python programmers, Jeremy shows step by step how to start with Python implementations, and then convert them largely automatically to CUDA. This approach, he argues, simplifies debugging and development. The tutorial is structured in a hands-on manner, encouraging viewers to follow along in a Colab notebook. Jeremy uses practical examples, starting with converting an RGB image to grayscale using CUDA, demonstrating the process step-by-step. He further explains the memory layout in GPUs, emphasizing the differences from CPU memory structures, and introduces key CUDA concepts like streaming multi-processors and CUDA cores. Jeremy then delves into more advanced topics, such as matrix multiplication, a critical operation in deep learning. He demonstrates how to implement matrix multiplication in Python first and then translates it to CUDA, highlighting the significant performance gains achievable with GPU programming. The tutorial also covers CUDA's intricacies, such as shared memory, thread blocks, and optimizing CUDA kernels. The tutorial also includes a section on setting up the CUDA environment on various systems using Conda, making it accessible for a wide range of users.

Jeremy Howard 的头像
Jeremy Howard2 年前

This is lecture 3 of the "CUDA Mode" series (but you don't need to watch the others first). The notebook is available in the lecture3 folder here: .

Jeremy Howard 的头像
Jeremy Howard2 年前

...or access the CUDA notebook directly via Colab here:

Jeremy Howard 的头像
Jeremy Howard2 年前

I've also posted this video as a YouTube link, if you prefer that format:

kache 的头像
kache2 年前

@GoogleColab hell yeah right in my favorite app x dot com

Jeremy Howard 的头像
Jeremy Howard2 年前

@GoogleColab Will be interesting to see how it compares to the YouTube version. Last time I compared the x version did *not* do well :(

Maxime Labonne 的头像
Maxime Labonne2 年前

@GoogleColab Absolutely brilliant Jeremy, thanks!

Jeremy Howard 的头像
Jeremy Howard2 年前

@GoogleColab You’re welcome!

Aurélien Geron 的头像
Aurélien Geron2 年前

@GoogleColab That's an excellent lecture! Very clear & progressive, yet dives pretty deep. I learned lots of cool tricks, thanks @jeremyphoward ! 👍

Jeremy Howard 的头像
Jeremy Howard2 年前

@GoogleColab So glad you like it :D

相关视频

Jacob Tierney discusses his process for writing Heated Rivalry and outlining season two: "The book [Heated Rivalry] is in five parts and very quickly I was like, part one, episode one. Part two, episode two. It was very clear to me. …So in this case, I actually did not outline. Because I was just using these parts of this book, and I knew these books so well at this point. Something that I did, and that I'm trying to do again now when I'm writing the new season, is I'm trying to use—Because there's a dreaminess to this show, I try to use my memory as a guide. I'm like, what do I remember? And then I try to give primacy to the stuff that I remember and that has stuck in my brain all these years with this story. So I’m like, oh I have to do that! And that's a nice way for me to kind of center things. Where if I have to do that, then it means maybe I don't have to do this, and it maybe means I want to combine or collapse different things. Because if this is going to take up—If one incident that I'm thinking of is going to take up the space in an episode that I think of as the heart, …then you don't need to do a first version of it in the same way, you know? Little things like that. That being said, for this season because I'm working with a co-writer as well, we have outlined everything. And every time, I do approach outlining like a teenager, where I'm like, [modulates voice] I don't want to. But then when I do it, I'm always like, why don't I always do this? It makes everything so much easier. So I kind of gaslight myself in that way." ✍🏼 transcription via Heated Rivalry News & Updates. Please credit if reposting. 🗣️ quote via q&a with Stage 32 on March 24, 2026. 🔗

Heated Rivalry News & Updates

60,684 次观看 • 3 个月前