Skip to content
Lex Fridman PodcastLex Fridman Podcast

Chris Lattner: Future of Programming and AI | Lex Fridman Podcast #381

Chris Lattner is a legendary software and hardware engineer, leading projects at Apple, Tesla, Google, SiFive, and Modular AI, including the development of Swift, LLVM, Clang, MLIR, CIRCT, TPUs, and Mojo. Please support this podcast by checking out our sponsors: - iHerb: https://lexfridman.com/iherb and use code LEX to get 22% off your order - Numerai: https://numer.ai/lex - InsideTracker: https://insidetracker.com/lex to get 20% off EPISODE LINKS: Chris's Twitter: https://twitter.com/clattner_llvm Chris's Website: http://nondot.org/sabre/ Mojo programming language: https://www.modular.com/mojo Modular AI: https://modular.com/ PODCAST INFO: Podcast website: https://lexfridman.com/podcast Apple Podcasts: https://apple.co/2lwqZIr Spotify: https://spoti.fi/2nEwCF8 RSS: https://lexfridman.com/feed/podcast/ Full episodes playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 Clips playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOeciFP3CBCIEElOJeitOr41 OUTLINE: 0:00 - Introduction 2:20 - Mojo programming language 12:37 - Code indentation 21:04 - The power of autotuning 30:54 - Typed programming languages 47:38 - Immutability 59:56 - Distributed deployment 1:34:23 - Mojo vs CPython 1:50:12 - Guido van Rossum 1:57:13 - Mojo vs PyTorch vs TensorFlow 2:00:37 - Swift programming language 2:06:09 - Julia programming language 2:11:14 - Switching programming languages 2:20:40 - Mojo playground 2:25:30 - Jeremy Howard 2:36:16 - Function overloading 2:44:41 - Error vs Exception 2:52:21 - Mojo roadmap 3:05:23 - Building a company 3:17:09 - ChatGPT 3:23:32 - Danger of AI 3:27:27 - Future of programming 3:30:43 - Advice for young people SOCIAL: - Twitter: https://twitter.com/lexfridman - LinkedIn: https://www.linkedin.com/in/lexfridman - Facebook: https://www.facebook.com/lexfridman - Instagram: https://www.instagram.com/lexfridman - Medium: https://medium.com/@lexfridman - Reddit: https://reddit.com/r/lexfridman - Support on Patreon: https://www.patreon.com/lexfridman

Chris LattnerguestLex Fridmanhost
Jun 1, 20233h 34mWatch on YouTube ↗

At a glance

WHAT IT’S REALLY ABOUT

Chris Lattner outlines Mojo and Modular to tame AI complexity

  1. Chris Lattner discusses Mojo, a new programming language that is a strict superset of Python designed to deliver Python’s ergonomics with C/C++-class performance and low-level control. Built on MLIR and a novel compiler architecture, Mojo supports interpreters, JIT, and ahead‑of‑time compilation, plus features like ownership, value semantics, traits, and compile‑time metaprogramming. Mojo is one pillar of Modular, a full‑stack AI platform meant to unify today’s fragmented ecosystem of frameworks, hardware accelerators, and deployment runtimes. Lattner’s overarching goal is to reduce the massive complexity in AI software so researchers and engineers can target any hardware, scale to huge models, and deploy reliably—without constantly rewriting code.

IDEAS WORTH REMEMBERING

5 ideas

Target Python ergonomics with near‑metal performance.

Mojo is designed as a strict superset of Python so existing Python syntax and idioms work, but it adds static types, ownership, and low‑level features to unlock 10–35,000x speedups over CPython on computational kernels while still feeling like Python to most users.

Use one language instead of Python + C/C++ hybrids.

Many Python libraries, especially in ML and scientific computing, are thin Python wrappers over C/C++ for speed. Mojo aims to consolidate this into a single language where you can write both high‑level APIs and low‑level kernels, simplifying packaging, debugging, and maintenance.

Exploit ownership and value semantics to reduce bugs and copies.

Mojo adopts ownership and a Swift‑style copy‑on‑write model so arrays, tensors, and other aggregates behave like values: you get logical copies without unnecessary physical copies, eliminating many aliasing bugs while still achieving high performance.

Leverage compile‑time meta‑programming and auto‑tuning.

By embedding an interpreter inside the compiler, Mojo can run Pythonic meta‑programming at compile time, generate specialized kernels, and perform auto‑tuning (trying parameter variants on real hardware, caching the best), allowing domain experts to encode optimization knowledge without hand‑coding every variant.

Unify heterogeneous hardware under a common compute runtime.

Modular’s engine abstracts CPUs, GPUs, TPUs, NPUs, edge accelerators, and multi‑node clusters into a single heterogeneous runtime that can schedule and partition compute graphs across devices, so model code doesn’t need to be rewritten for each new chip or deployment topology.

WORDS WORTH SAVING

5 quotes

My bitter enemy in the industry is complexity.

Chris Lattner

We’re not working forwards from making Python a little bit better, we’re working backwards from what is the limit of physics.

Chris Lattner

Python won. It owns machine learning. Our view is that Python is just not done yet.

Chris Lattner

If you have to rewrite all your code for every new device, that doesn’t scale. The world’s not going to get simpler—physics is only going to get weirder.

Chris Lattner

AI is this weird different thing right now. It shouldn’t be that way. It should just be another programming paradigm integrated into normal tools and languages.

Chris Lattner

Vision and design goals of Mojo as a superset of PythonModular’s full‑stack AI platform and heterogeneous runtimePerformance techniques: compilation, ownership, value semantics, and autotuningMeta‑programming, compile‑time execution, and influences from Swift, Rust, Lisp, C++Hardware diversity (CPUs, GPUs, TPUs, NPUs, accelerators) and kernel fusionPython ecosystem compatibility, migration strategy, and community dynamicsImpact of large language models on programming and the future of AI software

High quality AI-generated summary created from speaker-labeled transcript.

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.

Add to Chrome