Skip to main content

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