Dispatcher

PyTorch dispatcher, dispatch keys, operator registry, and extensibility

Recent

How Does the Dispatcher Work?

Aaron Orenstein (@aorenste) · April 16, 2026

I wanted to write about how PT2 does autograd, but that requires understanding eager autograd, which requires understanding the dispatcher. So let’s start there. Let’s Build Ourselves A Dispatcher Let’s pretend we’re building Torch. Let’s start from first principles with the problems we encounter and how to solve them. Problem 1: We want to be able to call operators for each backend. Solution: …

Read more →

All Dispatcher Logs