Sponsored Session: Lightning Talk: Accelerated Software for a Post-Moore World - Jay Dawani

PyTorch · Advanced ·🔧 Backend Engineering ·8mo ago

Key Takeaways

The video discusses accelerated software for a post-Moore world, highlighting the challenges of heterogeneous hardware, memory walls, and the need for efficient software stacks, with tools like PyTorch, CUDA, and Jax being utilized to address these issues.

Full Transcript

Hello everyone. My name is Jay. I am the co-founder and CEO of Frian Labs. Some of you may have heard of us, some of you may have not. Now, I'm going to be talking to you today about accelerated software for Post Morris World. It's going to make sense in a second. It's a whole lot of words. Now, most of you here have seen something along this lines. It is the modern software stack. it I tried to fit everything I could in one slide but it started getting too messy and in fact I don't think I could actually fit the current state of software into one slide because that is how brittle and fragmented and messy everything is right and it's why we have this conference with a few hundred companies trying to solve this problem now the interesting thing is how we got here right that is the actual problem what caused us to get to this world. Now, if you look at all the companies in the bottom box, it is every single chip company that is out there today. Every single one of those chip companies is building a software stack. Every single one of those companies is building a software stack that looks something like CUDA. And CUDA is 350 libraries, right? And that is what their entire ecosystem is. And everyone needs to go and replicate this. And then you have all the AI frameworks on top like PyTorch and Jax and TensorFlow and MXNet. And then you've got all the serving engines and you collectively look at all of this. There's about a thousand different permutations of choices you have to make. That's pretty nuts. But the more important and the most nutty thing is those hundreds of libraries that you need to get coverage across all of the models and all of the hardware that exists. It is roughly around 10 to the 21 That is an intractable problem, right? Even if you throw all of Elm compute at this problem, you still will not get coverage today. Now, what drove this? It was three primary shifts. You had the end of Mo's law, which means transistors stop becoming economical and they stop getting faster. That forces you into a world of heterogeneity, right? So in order to make up for the performance gap, you have special function units. You still many of them together into a single package and then you program them as if they were one chip. On top of that, you've got the memory wall, which means data movement is the most costly aspect of a system to the point where it is two to three orders of magnitude more expensive than doing the computation itself. Right? And as you start scaling AI models, that problem only gets worse. In when I started an AI, I could train a state-of-the-art model on two GPUs, right? Two GPUs. It's been 12 years now, and today to train a model, I need 200,000 GPUs, right? That amount of scale is obscene. But the more important part, the software we have was not built for it. The kernel model we have been relying on was designed for programming a single workload on a single chip that was embarrassingly parallel as in you had to be computebound in order to make best use of a kernel. And when I looked at all of this and how performance was coming I came to this conclusion that kernels have basically become the new assembly. Right? If that is the case, the failure is in compilers. And that's where this idea of a postmorte world came and how accelerated software was born. It was accelerated computing came from making certain parts of your workload faster. But when that stops, you need to relegate the important things of performance to the compiler. Right? Right? So the compiler helps you get the most performance out of your chip at whatever scale. Right? So why do I call kernels in new assembly? Firstly, you have multiple different tiers. Back in the 70s, they used to say real programmers write assembly. Today it's real ML engineers write kernels, right? And we write CUDA, we write PTX. And then you've got actually programming every physical part of the system if you want to get performance. But if you do that, you are locked in to that ecosystem. You are locked into that device. Changing anything means you have to do a complete rewrite. And most companies today are taking about 6 months to deploy a model because they're handwriting kernels. And so where do you lose the performance today? Why are kernels an actual problem? They don't help if you're memory bound. Today workloads don't fit in a single chip. You cannot get data in and out of a system fast enough. In fact, if you do an amazing job of writing a kernel, an absolutely tremendous job, you will actually make your hardware look worse. Let this sink in. You will make your hardware look worse with better kernels because you are exposing the latency of your system. The right way to get performance is to overlap communication with computation and try to essentially create this world where you're doing communication optimal linear algebra. But the problem is that is very hard or near impossible for a human to reason about right because you are shaping your code around the data movement. Takes a minute to wrap your head around. So you are spending almost 60% of your time slushing data around and only 15 to 20% of your time actually doing useful work. Most AI companies when I go and talk to them, they tell me they're somewhere between 3 and 45% utilization, right? So for anywhere between 55 to 97% of the time, your GPU is sitting there doing nothing, waiting for data to arrive so it can do something. That's a huge problem because these GPUs are expensive, right? And it's not just one of them. We're talking about hundreds and thousands of them just sitting idle. So what are we going to do about it? We believe this time for something different. So we asked ourselves a question. Could you build a hardware parallel optimizing compiler that can emit communication optimal code for any system at any scale, right? So can you program a system that contains many chips of different topologies as if it were one chip instead of programming each chip in that system individually? That was our challenge. After almost a year and a half of bunking our head against the wall, asking a whole bunch of questions, breaking things, we came up with an answer. We call it Tachion, as in faster than speed of light. That is our goal. Can you take PyTorch to the limit of device physics? So we have an integration with PyTorch. So you can take that model. We do a whole bunch of graph optimizations. We will emit code for the system you are targeting from any vendor and then feed that into our runtime which manages the execution. But it does fine grain management of the data movement to stage data to optimally use the compute units. So the goal is to keep all the compute units on the system as used as possible as frequently as possible. And we can do this. What happened here? >> Yeah. So we can do this because the compiler itself doesn't really care about the hardware. It queries this hardware parameters that so it understands what are the feeds and speeds of the system. What are the core count? What does the uncor look like? How many of these systems do I have? And then it uses that to do all the partitioning, all the fusion, all the loop enrolling and vectorizations and pick the right set of instructions that it can pass on. On early tests, we've been able to outperform at the kernel level some vendor software stacks by anywhere between 1.4 to 2x. Now, I do have to put a disclaimer. It's why it's in the bottom. If you do use the stack, a few things are likely to happen. You will get more performance. You will start hating kernel writing and you will realize that you've been gaslit all these years. So that is what we've been up to. A single abstraction that allows you to program any system at any scale for training and inference. So what does it do differently? You have a DSL that allows you to have fine grain control of the system and get the full performance of the compiler runtime. You have a graph IR that is explicitly parallel so it can capture more information than compilers normally do. You've got a graph optimizer that uses the hardware information to do all the different kind of optimizations to get you the most performance out of your cluster. And the code generator emits that object code specific to that device for the runtime to then execute for you. So it is coming soon to a cloud near you in 26 in the summer. If you want to get early access, come find us at our booth. We would love to sign you up and let you see what's actually possible. Thank you. [Applause]

Original Description

Sponsored Session: Lightning Talk: Accelerated Software for a Post-Moore World - Jay Dawani, Lemurian Labs Moore’s law has slowed while workloads grow and get more dynamic. Hardware is increasingly heterogeneous. The bottlenecks have shifted from compute to memory and networks. A kernel‑first model—optimizing one operator at a time—no longer delivers end‑to‑end gains. Local wins don’t add up, don’t transfer across devices, and fall over as shapes and schedules change. This talk makes the case for a new approach. Optimize at the system level. Treat the full workload, not a single kernel, as the unit of performance. Set clear objectives: throughput, latency, power, and cost, and demand predictable, portable results across different systems. We will explore where the current model fails on real workloads and what a system‑first mindset changes for framework design and everyday practice.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from PyTorch · PyTorch · 0 of 60

← Previous Next →
1 What is PyTorch?
What is PyTorch?
PyTorch
2 PyTorch Tutorial: A Quick Preview
PyTorch Tutorial: A Quick Preview
PyTorch
3 PyTorch Summer Hackathon 2019
PyTorch Summer Hackathon 2019
PyTorch
4 Tips and Tricks on Hacking with PyTorch: A Quick Tutorial by Brad Heintz
Tips and Tricks on Hacking with PyTorch: A Quick Tutorial by Brad Heintz
PyTorch
5 PyTorch 1.2 and PyTorch Hub: A Quick Introduction by Soumith Chintala and Ailing Zhang
PyTorch 1.2 and PyTorch Hub: A Quick Introduction by Soumith Chintala and Ailing Zhang
PyTorch
6 Torchtext 0.4 with Supervised Learning Datasets: A Quick Introduction by George Zhang
Torchtext 0.4 with Supervised Learning Datasets: A Quick Introduction by George Zhang
PyTorch
7 Torchaudio 0.3 with Kaldi Compatibility, New Transforms: A Quick Introduction by Jason Lian
Torchaudio 0.3 with Kaldi Compatibility, New Transforms: A Quick Introduction by Jason Lian
PyTorch
8 Torchvision 0.4 with Support for Video: A Quick Introduction by Francisco Massa
Torchvision 0.4 with Support for Video: A Quick Introduction by Francisco Massa
PyTorch
9 Introduction to Machine Learning for Developers at F8 2019
Introduction to Machine Learning for Developers at F8 2019
PyTorch
10 Powered by PyTorch at F8 2019
Powered by PyTorch at F8 2019
PyTorch
11 Developing and Scaling AI Experiences at Facebook with PyTorch at F8 2019
Developing and Scaling AI Experiences at Facebook with PyTorch at F8 2019
PyTorch
12 New Approaches to Image and Video Reconstruction Using Deep Learning at Facebook at F8 2019
New Approaches to Image and Video Reconstruction Using Deep Learning at Facebook at F8 2019
PyTorch
13 PyTorch Developer Conference 2018: Recap
PyTorch Developer Conference 2018: Recap
PyTorch
14 PyTorch Developer Conference 2018: Keynote & Deep Dive
PyTorch Developer Conference 2018: Keynote & Deep Dive
PyTorch
15 PyTorch Developer Conference 2018: Production & Research Sessions
PyTorch Developer Conference 2018: Production & Research Sessions
PyTorch
16 PyTorch Developer Conference 2018: Cloud & Academia Sessions
PyTorch Developer Conference 2018: Cloud & Academia Sessions
PyTorch
17 PyTorch Developer Conference 2018: Enterprise, Education, & Future of AI Panel
PyTorch Developer Conference 2018: Enterprise, Education, & Future of AI Panel
PyTorch
18 PyTorch Developer Conference 2019 | Full Livestream
PyTorch Developer Conference 2019 | Full Livestream
PyTorch
19 PyTorch Developer Conference 2019: Recap
PyTorch Developer Conference 2019: Recap
PyTorch
20 PyTorch Developer Conference Keynote - Mike Schroepfer
PyTorch Developer Conference Keynote - Mike Schroepfer
PyTorch
21 What’s new in PyTorch 1.3 - Lin Qiao
What’s new in PyTorch 1.3 - Lin Qiao
PyTorch
22 PyTorch Front-End Features: Named Tensors and Type Promotion - Gregory Chanan
PyTorch Front-End Features: Named Tensors and Type Promotion - Gregory Chanan
PyTorch
23 Research to Production: PyTorch JIT/TorchScript Updates - Michael Suo
Research to Production: PyTorch JIT/TorchScript Updates - Michael Suo
PyTorch
24 Quantization - Dmytro Dzhulgakov
Quantization - Dmytro Dzhulgakov
PyTorch
25 PyTorch ONNX Export Support - Lara Haidar, Microsoft
PyTorch ONNX Export Support - Lara Haidar, Microsoft
PyTorch
26 Apex -  Michael Carilli, NVIDIA
Apex - Michael Carilli, NVIDIA
PyTorch
27 Dataloader Design for PyTorch - Tongzhou Wang, MIT
Dataloader Design for PyTorch - Tongzhou Wang, MIT
PyTorch
28 Linear Algebra in PyTorch - Vishwak Srinivasan, CMU
Linear Algebra in PyTorch - Vishwak Srinivasan, CMU
PyTorch
29 PyTorch Mobile - David Reiss
PyTorch Mobile - David Reiss
PyTorch
30 Model Interpretability with Captum - Narine Kokhilkyan
Model Interpretability with Captum - Narine Kokhilkyan
PyTorch
31 Detectron2 - Next Gen Object Detection Library - Yuxin Wu
Detectron2 - Next Gen Object Detection Library - Yuxin Wu
PyTorch
32 Speech Extensions to Fairseq - Dmytro Okhonko
Speech Extensions to Fairseq - Dmytro Okhonko
PyTorch
33 PyTorch on Google Cloud TPUs - Google, Salesforce, Facebook
PyTorch on Google Cloud TPUs - Google, Salesforce, Facebook
PyTorch
34 PyTorch Summer Hackathon Winners - Joe Spisak, Sebastien Arnold, Tristan Deleu
PyTorch Summer Hackathon Winners - Joe Spisak, Sebastien Arnold, Tristan Deleu
PyTorch
35 PyTorch in Robotics - Yisong Yue, Caltech
PyTorch in Robotics - Yisong Yue, Caltech
PyTorch
36 StanfordNLP - Yuhao Zhang, Stanford
StanfordNLP - Yuhao Zhang, Stanford
PyTorch
37 Sotabench for Reproducible Research - Robert Stojnic, Papers with Code
Sotabench for Reproducible Research - Robert Stojnic, Papers with Code
PyTorch
38 Collaborative Natural Language Inference - Sasha Rush, Cornell
Collaborative Natural Language Inference - Sasha Rush, Cornell
PyTorch
39 Privacy Preserving AI - Andrew Trask, OpenMined
Privacy Preserving AI - Andrew Trask, OpenMined
PyTorch
40 CrypTen - Laurens van der Maaten
CrypTen - Laurens van der Maaten
PyTorch
41 PyTorch at Uber - Sidney Zhang, Uber
PyTorch at Uber - Sidney Zhang, Uber
PyTorch
42 PyTorch at Tesla - Andrej Karpathy, Tesla
PyTorch at Tesla - Andrej Karpathy, Tesla
PyTorch
43 PyTorch at Microsoft - Saurabh Tiwary, Microsoft
PyTorch at Microsoft - Saurabh Tiwary, Microsoft
PyTorch
44 PyTorch at Dolby Labs - Vivek Kumar, Dolby Labs
PyTorch at Dolby Labs - Vivek Kumar, Dolby Labs
PyTorch
45 PyTorch Developer Conference 2019 - Panel Discussion
PyTorch Developer Conference 2019 - Panel Discussion
PyTorch
46 Using deep learning and PyTorch to power next gen aircraft at Caltech
Using deep learning and PyTorch to power next gen aircraft at Caltech
PyTorch
47 Named Tensors, Model Quantization, and the Latest PyTorch Features - Part 1
Named Tensors, Model Quantization, and the Latest PyTorch Features - Part 1
PyTorch
48 TorchScript and PyTorch JIT | Deep Dive
TorchScript and PyTorch JIT | Deep Dive
PyTorch
49 Announcing the PyTorch Global Summer Hackathon 2020
Announcing the PyTorch Global Summer Hackathon 2020
PyTorch
50 Opening Up the Black Box: Model Understanding with Captum and PyTorch
Opening Up the Black Box: Model Understanding with Captum and PyTorch
PyTorch
51 PyTorch Mobile Runtime for Android
PyTorch Mobile Runtime for Android
PyTorch
52 Torchvision in 5 minutes
Torchvision in 5 minutes
PyTorch
53 3D Deep Learning with PyTorch3D
3D Deep Learning with PyTorch3D
PyTorch
54 What is Torchtext?
What is Torchtext?
PyTorch
55 TorchAudio: A Quick Intro
TorchAudio: A Quick Intro
PyTorch
56 PyTorch Mobile Runtime for iOS
PyTorch Mobile Runtime for iOS
PyTorch
57 PySlowFast: Deep learning with Video
PySlowFast: Deep learning with Video
PyTorch
58 PyTorch Pruning | How it's Made by Michela Paganini
PyTorch Pruning | How it's Made by Michela Paganini
PyTorch
59 Measuring Fairness in Machine Learning Systems
Measuring Fairness in Machine Learning Systems
PyTorch
60 PyTorch for Hackathons
PyTorch for Hackathons
PyTorch

The video teaches the importance of accelerated software in a post-Moore world, where hardware heterogeneity and memory walls pose significant challenges, and demonstrates how tools like PyTorch and CUDA can be used to address these issues. The key takeaway is that efficient software stacks are crucial for optimizing AI model training and improving hardware utilization. By understanding the challenges of heterogeneous hardware and memory walls, developers can create more efficient software stack

Key Takeaways
  1. Write kernels for specific hardware
  2. Handwrite kernels for optimal performance
  3. Use Tachion for kernel optimization
  4. Utilize vendor software stacks like CUDA and PyTorch
  5. Implement a single abstraction for programming any system at any scale
  6. Use a DSL for full compiler runtime performance
  7. Leverage Graph IR for explicit parallelism and capturing more information than compilers
💡 The end of Moore's law has led to a world of heterogeneity, with special function units and the memory wall, making data movement two to three orders of magnitude more expensive than computation, and thus, efficient software stacks are crucial for optimizing AI model training and improving hardware

Related Reads

📰
Pain point #2: Django’s ORM Performance Problem
Django's ORM can hurt database performance, learn how to identify and fix this issue
Medium · Python
📰
Why We Stop Injecting Code Into Shopify Themes for B2B Wholesale
Learn why injecting code into Shopify themes for B2B wholesale is problematic and how decoupling architecture can improve performance
Dev.to · Anil Kumar
📰
A founder once asked me why refunds kept disappearing, here is what NestJS was actually doing
Learn how to troubleshoot and resolve a refunds disappearance issue in a NestJS application
Dev.to · Peace Melodi
📰
I reviewed a NestJS fintech backend where the numbers never quite matched, this is the fix
Learn to debug and fix financial discrepancies in a NestJS fintech backend by identifying and resolving data inconsistencies
Dev.to · Peace Melodi
Up next
Beginners Guide to GPT4 API & ChatGPT 3.5 Turbo API Tutorial
Adrian Twarog
Watch →