Build a PyTorch ReLU Kernel with Hugging Face Kernels (CPU + Metal)

From the creator

In this video, I walk through the Hugging Face Kernels Library and build a real PyTorch ReLU kernel end to end. You’ll see how to package kernels, publish compiled artifacts, and load the right kernel at runtime based on your environment. What we cover: - What the Hugging Face Kernels Library is and why it exists - Kernel builder workflow (source → build matrix → artifacts) - CPU + Metal implementation walkthrough - Torch extension + Python wrapper setup - Nix-based deterministic builds and caching - Runtime kernel selection with get_local_kernel Chapters: 00:00 Intro 00:31 What the Kernels Library does 02:35 Why use it 04:42 Kernel project structure 06:04 Live demo: ReLU kernel (CPU + Metal) 08:02 Torch extension and Python wrapper 09:36 Build process with Nix + cache 10:49 Build outputs and artifact matrix 12:00 Local usage and runtime selection 13:42 Docs and wrap-up

Choose to Build with AI
Matched to Hugging Face

AI Maker Residence 3

The third AI workshop taught by our legendary teacher, Nick Sarafa. This is a full-day hands-on training workshop for purposeful co-creation with AI using Claude Code. Imagine having access to hundreds of billions of dollars of computing power and knowing exactly how to make it work for you through the power of super intelligence.

◆ Fri 09 Oct 2026 ◆ KOKO Cafe, London ◆ With Nick Sarafa
AI Maker Residence 3
Live event
AI Maker Residence 3
Fri 09 Oct 2026

More like this

Running one yourself?

List your AI event,
wherever it is.

A meetup, a workshop, a hackathon, a conference. Any city, or online. Tell us about it and it lands in front of people already learning this stuff.