torch-preflight: A linter for PyTorch that catches bugs and estimates VRAM to save GPU hours

LeJanbandhu · reddit · 2026-08-14

Developer releases torch-preflight, a linter for PyTorch that catches common bugs (like missing zerograd, gradient accumulation without division) that waste GPU hours. It doesn't import or execute code, so no GPU or torch install needed. It also estimates VRAM usage to check if a training run fits on a given GPU, with suggestions to save memory. Currently has 13 rules, memory estimates within 4% of measured peaks.

Original post →

More from coding & agent

coding & agent channel →