Skip to content
0:00 / 0:00

#llvm#swift#mlir

Chris Lattner: Compilers, LLVM, Swift, TPU, and ML Accelerators | Lex Fridman Podcast #21

Lex Fridman

5M subscribers • 39 videos on Hallway

YouTube
  • Recommended by 4 people: 2 on Hacker News and 2 in engineering communities.
  • A classic. People kept recommending it from 2019 to 2025.
  • Presented by Chris Lattner, creator of LLVM and Swift
  • May be out of date. Uploaded 7 years ago, in an area where tools change fast.

Intermediate. Assumes working knowledge.

200K views7 years ago4 recommendations

Systems programmingAI and machine learningCompilers and interpretersGPUs, shaders and CUDASwift

Chris Lattner discusses the design of LLVM, the Swift programming language, and how compilers optimize code for machine learning accelerators.

Chris Lattner is a senior director at Google working on several projects including CPU, GPU, TPU accelerators for TensorFlow, Swift for TensorFlow, and all kinds of machine learning compiler magic going on behind the scenes. He is one of the top experts in the world on compiler technologies, which means he deeply understands the intricacies of how hardware and software come together to create efficient code. He created the LLVM compiler infrastructure project and the CLang compiler. He led major engineering efforts at Apple, including the creation of the Swift programming language. He also briefly spent time at Tesla as VP of Autopilot Software during the transition from Autopilot hardware 1 to hardware 2, when Tesla essentially started from scratch to build an in-house software infrastructure for Autopilot. Thank you for listening ❤ Check out our sponsors: lexfridman.com/sponsors/ep21-sb See below for timestamps, and to give feedback, submit questions, contact Lex, etc. *CONTACT LEX:* *Feedback* - give feedback to Lex: lexfridman.com/survey *AMA* - submit questions, videos or call-in: lexfridman.com/ama *Hiring* - join our team: lexfridman.com/hiring *Other* - other ways to get in touch: lexfridman.com/contact *OUTLINE:* - Introduction - First program, BASIC, Pascal, C - Compilers, LLVM, CLang - Apple - LLVM, Objective-C, Swift - Google - Swift, Swift for TensorFlow, compilers, Colab - TPU & TensorFlow, hardware/software co-design - MLIR (Multi-Level Intermediate Representation) framework - Open sourcing of TensorFlow - Tesla - transition from HW1 to HW2 - Elon Musk and time at Tesla - Working hard - Dragons *PODCAST LINKS:* - Podcast Website: lexfridman.com/podcast - Apple Podcasts: apple.co/2lwqZIr - Spotify: open.spotify.com/episode/5fpAb2OpRL3Uy8ZTq94vD8 - RSS: lexfridman.com/feed/podcast/ - Podcast Playlist: youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 - Clips Channel: youtube.com/lexclips *SOCIAL LINKS:* - X: x.com/lexfridman - Instagram: instagram.com/lexfridman - TikTok: tiktok.com/@lexfridman - LinkedIn: linkedin.com/in/lexfridman - Facebook: facebook.com/lexfridman - Patreon: patreon.com/lexfridman - Telegram: t.me/lexfridman - Reddit: reddit.com/r/lexfridman

Why it's here

4 people recommend this

What people say. Engineers recommend this interview for insights into compiler design, LLVM, and hardware-software co-design for ML.

u/dharmatechin r/ProgrammingLanguages • Recommends

Chris Lattner: Compilers, LLVM, Swift, TPU, and ML Accelerators

mwattsunon Hacker News • Recommends

On “Apple’s use of Swift and SwiftUI in iOS 15”

I always wondered why the creator of Rust switched to Swift and just now found my answer by Graydon Hoare himself: link tl;dr it has nothing to do with the relative merits of the two languages --- Edit: I watched a couple of Lex Fridman podcasts this week with Chris Lattner (creator of Swift) that I thought were interesting Chris Lattner: Compilers, LLVM, Swift, TPU, and ML Accelerators | Lex Fridman Podcast #21 link to this video Chris Lattner: The Future of Computing and Programming Languages | Lex Fridman Podcast #131 link

tonyon Hacker News • Recommends

On “ML needs a new programming language – Interview with Chris Lattner”

Chris Lattner also has a very good episode on Lex Fridman (Episode 381, June 2nd, 2023): - link - link - link He has two other episodes on the show: - link (Episode 131, October 18th, 2020) - link to this video (Episode 21, May 13th, 2019)

u/CultistHeadpiecein r/compsci • Recommends

Chris Lattner: Compilers, LLVM, Swift, TPU, and ML Accelerators

u/NotAFlyingDuckin r/ProgrammingLanguages • Mentions

On “Talks by designers of popular languages?”

Lex Fridman had a great talk with Chris Lattner, who made LLVM, Clang, and Swift. It’s on YouTube. It’s not really a Ted Talk, but it’s a great video where they talk about a whole lotta good stuff :)

u/Dense-Buttonin r/ProgrammingLanguages • Mentions

On “"I find your lack of syntax variety disturbing" | Syntax Discussion”

It's in either one of these 2 link to this video link to this video I don't remember which point exactly, both are pretty long.

cs702on Hacker News • Mentions

On “Differentiable Programming Mega-Proposal”

How does this relate to all the work that Christ Lattner et al have been doing at Google with Swift, MLIR, etc.?a Is this... a separate, parallel, more encompassing proposal? Is there any coordination between these two groups? -- a link to this video

mynegationon Hacker News • Mentions

On “Ask HN: Compiler Engineers, what would you advise new grads/students to learn?”

> Aren't there already many ML libraries for compiled languages out there or are you referring to something else? Something else. If your program is a well-defined set of operations (basically matrix operations for ML), you can optimize the whole specific program instead of calling bunch of individually optimized functions from the library and target a specific hardware (e.g. given GPU). Check for example Chris Lattner’s interview 1 and presentations on MLIR, or proceedings of C4ML workshop 2. Application in distributed systems: from the top of my head - protobufs, compilation of Erlang and Elixir to BEAM, dask. 1 link to this video 2 link