PyTorch: The Great NaN and Negative Zero Cleanup

A single engineer swept through nine subsystems fixing float comparison bugs where NaN and negative zero broke caching, guards, and pattern matching, while three separate contributors raced to fix the same overlap scheduler crash.

Duration: PT2M41S

Episode overview

This episode is a short developer briefing from PyTorch.

It explains recent repository work in plain language.

  • Show: PyTorch
  • Published: 2026-08-09T13:00:24Z
  • Audio duration: PT2M41S

Transcript excerpt

This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.

Good morning. It's August 9th, 2026, and today's codebase activity has two clear signals: a systemic float-comparison bug pattern, and a case of triplicate bug fixing.

Start with the big one. Ezyang shipped roughly ten linked pull requests, all addressing the same root problem: Python's float equality treats negative zero as equal to zero, and treats NaN as never equal to itself. That mismatch quietly broke caching and matching logic across the stack. In Dynamo, guards could…

Second theme: redundant fixes converging on one bug. Three separate PRs, 192618, 192627, and 192628, from three different authors, all fix the identical crash in the Inductor overlap scheduler, where running without a memory cap leaves a null tracker that later code dereferences unconditionally. Robertomeroni's PR…

Elsewhere, real correctness fixes landed: `torch.special.ndtr` was flushing valid lower-tail values to zero in float64 (192632), `torch.fft.fftfreq` could clobber memory with non-contiguous output (192609), and `torch.all`/`torch.any` silently truncated float inputs through a uint8 output buffer (192620). On the…

What's next: watch for the ezyang stack to merge as a unit, and expect the overlap…

Nearby episodes from PyTorch

  1. Release Branch Cleanup and the Great Test Decoupling
  2. The Great Test Reclassification
  3. The Great Test Suite Decoupling
  4. Weekly Recap - Test Infrastructure Overhaul and Correctness Fixes
  5. Closing the GPU Test Coverage Gap
  6. The Great Device-Agnostic Test Migration
  7. Hardening Distributed Communication and Cutting Legacy Support
  8. Test Debt, GPU Correctness, and the Long Tail of Cleanup