Understanding AI Kernels: How AWS Chips Run Code with Emily Webber
Super Data Science: ML & AI Podcast with Jon KrohnApril 23, 20254 min311 views
3 connectionsΒ·6 entities in this videoβWhat is an AI Kernel?
- π‘ A kernel is fundamentally a user-defined function, which differs from how we typically think about programming in Python.
- π§ As you move down the compute stack, especially for hardware like Trainium and Inferentia, kernels become crucial for defining operations directly on the chip.
The Compilation Process
- βοΈ When programming in PyTorch, the model is compiled through PyTorch XLA (Accelerated Linear Algebra), which represents the model as a graph called an HLO (High-Level Operations) graph.
- π This HLO graph is then fed into a compiler that converts it into an instruction set executable directly on the hardware.
- π οΈ A kernel allows users to override the compiler and define these chip operations themselves using a specific kernel library.
Kernel Library and Usage
- π AWS's kernel library is called Nikki (Neuron Kernel Interface).
- π― Kernels can range from simple functions like tensor addition to defining entire model passes (forward or backward).
- π Developing kernels involves studying compute optimization, including data movement, memory utilization, and compute utilization.
- π» The goal is to implement algorithms as kernels to improve performance, particularly for workloads like large language models.
Knowledge graph6 entities Β· 3 connections
How they connect
An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.
Hover Β· drag to explore
6 entities
Chapters2 moments
Key Moments
Transcript15 segments
Full Transcript
Topics12 themes
Whatβs Discussed
AI KernelUser-Defined FunctionCompute StackAWS TrainiumAWS InferentiaPyTorch XLAHLO GraphCompilerInstruction SetNikki Kernel InterfaceCompute OptimizationLarge Language Models
Smart Objects6 Β· 3 links
ProductsΒ· 2
ConceptsΒ· 3
PersonΒ· 1