
43 segments available
Chris Lattner, a senior director at Google, shares his extensive background in compiler technologies, including the creation of LLVM and Clang. He discusses his journey from developing programming languages to working on machine learning accelerators, highlighting his expertise in bridging hardware and software.
"the following is a conversation with Chris flattener currently he's a senior director of Google working on several projects including CPU GPU TPU accelerators for tensorflow swift for tensorflow and a..."
Lattner delves into the fascinating world of compilers, explaining how they serve as a bridge between human-written code and machine-executable instructions. He emphasizes the complexity and beauty of compiler design, which combines rigorous science with creative problem-solving.
"behind the scenes he's 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 cod..."
Chris recounts his early experiences with programming, starting with BASIC and evolving through various languages like Pascal and C. He reflects on the challenges and joys of learning to code, including the mistakes he made and the lessons he learned along the way.
"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 vi..."
Lattner discusses his transition from Pascal to C and C++, highlighting the complexities of memory management and pointers. He shares insights into how these languages shaped his understanding of programming and the importance of abstraction in software development.
"most fundamental and fascinating aspects of what computers do and he is one of the world experts in this process it's rigorous science and it's messy beautiful art this conversation is part of the art..."
In this segment, Chris explains the different phases of a compiler, including the front-end, optimizer, and back-end. He describes how compilers translate high-level programming languages into machine code, emphasizing the importance of optimization for performance.
"figure out why they were not working right that kind of stuff so basic what was the first language that you remember yourself maybe falling in love with like really connecting with I don't know I mean..."
Lattner introduces LLVM, the compiler infrastructure he created, and discusses its significance in standardizing compiler design. He explains how LLVM allows multiple programming languages to share optimization infrastructure, enhancing performance across various hardware platforms.
"Pasco which was really cool through Pascal was amazing for its day eventually going to C C++ and then kind of did lots of other weird things I feel like you took the dark path which is the you could y..."
Chris highlights the collaborative nature of the LLVM community, where competitors like Google, Apple, and Intel work together to improve compiler infrastructure. He discusses the benefits of open-source collaboration in advancing technology and reducing costs.
"what is this journey to see is that in high school is that in college that was in high school yeah so and then that was it was really about trying to be able to do more powerful things than what Pasca..."
Lattner shares the origins of LLVM as a university project and its evolution into a widely used compiler infrastructure. He reflects on the initial challenges and the excitement of building something impactful that has grown beyond his expectations.
"you're supposed to manage well so you have that in Pascal as well but in Pascal these like the carrot instead of the star and there's some small differences like that but it's not about pointer arithm..."
In this segment, Chris discusses his passion for compilers, inspired by his professor Steve Bechtel. He explains how the complexity of compilers and the challenge of optimizing code drew him into this field, leading to a fulfilling career in software engineering.
"it that you find yourself the creator and lead developer one of the most powerful compiler optimization systems than used today sure so I guess they're different things so let's start with what is a c..."
Lattner explores the role of parsing in compilers, discussing how it involves analyzing and breaking down programming languages. He contrasts his interests in optimization with the formal theories behind parsing, revealing his preference for building and creating.
"allowing humans to think of the level of abstraction that they want to think about and then get that program get the thing that they wrote to run on a specific piece of hardware and the interesting an..."
Chris Lattner shares his early experiences with compilers, highlighting the influence of his mentor, Steve Eggdahl. He discusses the unique structure of compiler classes in computer science, where students work on a single project throughout the semester, fostering deep engagement and learning. Lattner reflects on how this experience shaped his decision to pursue graduate studies despite initial hesitations.
"small school it was a kind of a wart on the side of the math department kind of a thing at the time I think it's evolved a lot in the many years since then but but Steve egg Dahl was a compiler guy an..."
In this segment, Lattner explains his fascination with building compilers, emphasizing the joy of creating and optimizing code. He contrasts his interests with formal mathematical theories, focusing instead on the practical aspects of compiler design and implementation. This passion led him to work on LLVM, where he enjoyed the challenge of implementing standard algorithms.
"not regret it what aspects of compilers were the things you connected with so LVM there's also the other part this is really interesting if you're interested in languages is parsing and you know just ..."
Lattner delves into the complexities of the C++ programming language, discussing its extensive specification and the challenges it presents for compilers. He highlights the intricate interactions between subsystems and the historical decisions that have compounded its complexity. This segment underscores the difficulties faced by compiler developers when parsing and optimizing C++ code.
"that so he said compositor these complicated systems can you even just with language tried to describe you know how you turn a C++ program yes into code like what are the hard parts why is this hard s..."
Chris Lattner discusses the development of Clang, a C/C++ compiler designed to improve upon GCC. He explains the goals of enhancing user experience through better error messages and compile-time efficiency. Lattner emphasizes the importance of creating new tools for refactoring and analysis, which Clang has successfully integrated into the development ecosystem.
"to work with and it was full of global variables and other other things that made it very difficult to reuse in ways that it wasn't originally designed for and so with claying one of the things what w..."
In this segment, Lattner explains the concept of abstract syntax trees and intermediate representations in compilers. He describes how these structures facilitate the transformation of high-level code into machine code, emphasizing the importance of language independence in compiler design. Lattner also compares compiler representations to neural network graphs, highlighting their similarities.
"like that but C++ and the front-end piece is complicated and you have to build syntax trees and you have to check every rule in the spec and you have to turn that back into an error message to the hum..."
Lattner discusses various optimization techniques used in compilers, focusing on register allocation and instruction scheduling. He explains how these techniques can significantly impact performance, especially in loops. This segment highlights the challenges compilers face in optimizing code while considering the constraints of modern processors.
"block and then you have branches like conditional branches between blocks and so when you write a loop for example in a syntax tree you would have a four node like for a for statement and I see like l..."
In this forward-looking segment, Lattner explores the potential of machine learning to enhance compiler optimization. He discusses current research efforts in applying machine learning techniques to improve parameter tuning and optimization strategies. Lattner emphasizes the need for structured approaches to leverage machine learning effectively in compiler design.
"cool so what's like the biggest bang for the buck with optimization what's there yeah well no not even today at the very beginning the 80s I don't know but yeah so for the 80s a lot of it was things l..."
In this segment, Lattner outlines the current state of research in compiler optimization, discussing the use of reinforcement learning and brute force search methods. He emphasizes the complexity of optimizing code generation for specific tasks, such as matrix multiplication on GPUs.
"optimize for code code size is another one that some people care about in the embedded space is this like the thinking into the future or somebody actually been crazy enough to try to have machine lea..."
Lattner reflects on the transformative impact of Java in the mid-90s, particularly its introduction of JIT compilation and garbage collection. He discusses how Java's innovations changed industry standards and influenced the development of modern compilers.
"search is very powerful for that and it gets used in in certain ways but it's not very structured this is something that we need we as an industry need to fix these set ATS but like so have there been..."
This segment delves into how Java's bytecode allows for portable code execution across different platforms. Lattner explains the significance of this approach in enhancing software portability and the implications for web development.
"therefore changed the way people thought about the problem javascript was another major world change based on the way it works but also on the hardware side of things multi-core and vector instruction..."
Lattner discusses the standardization of LLVM and its unexpected applications, such as in Sony's graphics compilation for movie production. He contrasts LLVM's infrastructure capabilities with those of GCC, highlighting LLVM's modular design.
"pipeline yeah so so what what the java virtual machine does is it splits just like I've talked about before where you have a front-end that parses the code and then you have an intermediate representa..."
In this segment, Lattner shares insights into the LLVM community's growth and collaborative nature. He discusses the importance of community-driven development and the establishment of code ownership to manage contributions effectively.
"your portability problems I think it's been really good now Java ultimately didn't win out on the desktop and like there are good reasons for that but it's been very successful on servers and in many ..."
Lattner reflects on his experience leading LLVM development at Apple, focusing on the challenges of transitioning to new architectures and improving developer experience. He discusses the motivations behind creating Swift and enhancing Xcode.
"infrastructure when it can be used in ways it was never designed for because it has good layering and software engineering and it's composable and things like that just where as you said it differs fr..."
Lattner simplifies the complexities involved in compiler design, particularly the challenges of parsing source code and optimizing developer experience. He shares his personal journey of exploring compiler development during his time at Apple.
"and the OS is it compiles Google's production server applications let's use to build my GameCube games and PlayStation 4 and things like that I was a user I have but just everything I've done that I e..."
Chris Lattner discusses the importance of community in software development, emphasizing the trust and respect built over years among developers. He reflects on how these relationships facilitate collaboration, even amidst differing opinions, and sets the stage for his journey at Apple, where he aimed to make LLVM production-ready.
"are interested in similar kinds of problems and have been working together effectively for years and have a lot of trust and respect for each other and even if they don't always agree that you know we..."
Lattner shares insights into his leadership role at Apple from 2013 to 2017, focusing on the challenges of managing a large team of developers. He highlights the motivation behind creating Swift, transitioning from Objective-C, and the technical hurdles faced in enhancing developer experience.
"creating Swift the early birth of it's from objective-c and so on and Xcode well yeah so these are different questions yeah I know what about the other stuff I'll stay I'll stay on the technical side ..."
In this segment, Lattner recounts his initial foray into compiler development, starting with LLVM. He describes the complexities of writing a C compiler and how he gradually built a team to tackle these challenges, emphasizing the importance of incremental progress in software engineering.
"be and so you know as as I occasionally do I'm like well okay how hard is it to write a C compiler and so I I'm not gonna commit to anybody I'm not gonna tell anybody I'm just gonna just do it on nice..."
Lattner explains the inception of Swift, detailing how it evolved from the need for a better programming language than Objective-C. He discusses the early stages of development, the encouragement from leadership, and the initial skepticism surrounding the creation of a new language at Apple.
"formed and it starts taking off and c++ for example huge complicated language people always assume that it's impossible to implement and it's very nearly impossible but it's just really really hard an..."
This segment delves into the social dynamics at Apple regarding the introduction of Swift. Lattner discusses the resistance to change from Objective-C, the perception of Objective-C's success, and the challenges of convincing the team to embrace a new language focused on safety and modern programming practices.
"at the same time I started talking with the senior VP of software at the time a guy named Burt Ron stole a and Burt Ron was very encouraging he was like well you know let's let's have fun let's talk a..."
Lattner outlines the design principles that guided the development of Swift, including the importance of memory safety and the decision to maintain a typed language. He emphasizes the need for a language that balances performance with ease of use, allowing for both high-level and low-level programming.
"learn and so one of the challenges of making Swift happen that was totally non-technical is the the social part of what do we do like if we do a new language which at Apple many things happen that don..."
In this segment, Lattner discusses the rationale behind choosing a compiled language for Swift. He reflects on Apple's historical considerations of Java and the necessity for efficient memory management in mobile development, reinforcing the value of static compilation in the context of iPhone development.
"of it so well what are some design choices early on and Swift like we're talking about braces are you making a type language or not all those kinds of things yeah so some of those were obvious given t..."
Lattner explains the flexibility of Swift's compilation process, highlighting its capabilities for both static and dynamic compilation. He discusses how Swift can be used in various environments, including interactive workbooks, and the implications of this design choice for developers.
"much part of the apple value system now javascript is also a thing right I mean it's not it's not that this is exclusive and technologies are good depending on how they're applied right but in the des..."
This segment focuses on the educational design of Swift, where Lattner emphasizes the principle of progressive disclosure of complexity. He illustrates how Swift allows beginners to start coding with simple statements and gradually introduces more complex concepts, making it accessible for new programmers.
"because you have the right abstractions there and so the way that a collab workbook works with Swift is that we start typing into it it creates a process a UNIX process and then each line of code you ..."
Lattner discusses the integration of Python into Swift, explaining how Swift can interact with Python objects. He describes the implementation challenges and the new language features added to facilitate seamless communication between Swift and Python, showcasing Swift's versatility in modern programming.
"writers that want to be able to use the the nitty-gritty details but then other people just want to use the libraries and work at a higher abstraction level it's kind of cool that I saw that you can j..."
In this segment, Lattner explains how Swift serves as a front-end for TensorFlow, discussing the unique advantages it offers over Python. He highlights the ability to add language features that cater specifically to machine learning needs, enhancing performance and usability for developers.
"systems computation needs to be converted to a graph so what's that process like what are the challenges there yeah so I I'm tangentially involved in this but the the way that it works with autograph ..."
Lattner explores the concept of automatic differentiation within the Swift for TensorFlow project. He discusses the historical context of differentiation techniques and how Swift's integration allows for more efficient and effective machine learning model training.
"else are effectively language bindings so they they call into the tense flow runtime but they're not they usually don't have automatic differentiation or they usually don't provide anything other than..."
Chris Lattner shares insights on Google's TPUs, emphasizing the interplay between hardware and software in optimizing machine learning performance. He discusses the design considerations that go into building TPUs and how they address specific machine learning challenges.
"ation there's another big deal and it's I think one of the key contributions of the Swift for tensorflow project is that there's this entire body of work on automatic differentiation that dates back t..."
Lattner introduces the MLI project, aimed at creating a common infrastructure for various compiler systems within TensorFlow. He discusses the potential for collaboration in the industry and how MLI seeks to improve code sharing and reduce redundancy in compiler development.
"watt or area per cost or like whatever it is that you're optimizing for and so one of the amazing things about TP use is this numeric format called b-flat 16b float16 is a compressed 16-bit floating-p..."
In this concluding segment, Lattner reflects on the significance of open-source initiatives like TensorFlow in revolutionizing the machine learning landscape. He contrasts the open-source approach at Google with the more proprietary stance of other companies, emphasizing the long-term benefits of community collaboration.
"foster some of that that you know working together to solve common problem energy that has been useful in the compiler field before beyond that mor is some people have joked that it's kind of LVM to i..."
Chris Lattner discusses Elon Musk's unique ability to attract talent through his compelling vision for the future. He acknowledges the high turnover at Tesla but respects Musk's capacity to inspire others to work towards ambitious goals. Lattner contrasts Musk's methods with his own, recognizing the power of vision in driving innovation and change within the company.
"has all kinds of ripple effects I think it is really I mean you can't understate Google does adding that how profound that is for software is awesome well and it's been in again I can understand the c..."
Lattner shares his perspective on what it means to work hard in the tech industry, emphasizing the need to balance short-term execution with long-term vision. He reflects on his experiences at Apple and how building strong teams allowed him to focus on innovative ideas while ensuring that immediate tasks were completed. This balance is crucial for achieving significant advancements in technology.
"let's try this real quick yeah you were at Tesla for five months as the VP of auto pilot software you led the team during the transition from each hardware one hardware to I have a couple questions so..."
Chris Lattner explains the story behind the LLVM logo, a dragon, which symbolizes power, speed, and intelligence. He reveals that the logo was inspired by the 'Dragon Book,' a seminal text on compiler design. Lattner discusses how the logo came to be and its significance within the LLVM community, highlighting the collaborative spirit that helped establish its identity.
"stay maybe slow down say hardware one or that those kinds of decisions just taking it full-on let's let's do this from scratch what was that like well so I mean I don't think Tesla has a culture of ta..."
Lattner talks about the importance of engaging new talent in the field of compilers and software engineering. He shares how his wife, who runs the LLVM Foundation, actively works to attract more women into the field. By leveraging popular culture, such as Game of Thrones, they aim to inspire the next generation of engineers to get involved in compiler technology and software development.
"team that had built harder ones driver assistance features so you spoke in a collected and kind way about your time at Tesla but it was ultimately not a good fit Elon Musk we've talked on his podcast ..."