~/lightning

Lightning Talk: Building Intermediate Logging for PyTorch

Lightningat PyTorch Conference 2023 · 2023-10-16..10-17· [machine-learning]
links:none on file
slides:none on file

An API captures module arguments, parameters, buffers, outputs and gradients that works across TorchScript, torch.compile, Torch FX, torch.package and plain pickles by abusing forward hooks plus a noop C++ autograd to observe gradients in scripted code. Implementation uses dynamic codegen to emit per-module hooks, tricks to force the compiler to keep buffers/calls, prefers buffers over parameters, and a linecache + importlib loader plus base32-encoded function names to survive pickling. More than 100 tests validate it; cases found gradients off by orders of magnitude and one model is halved in size after fixes.

AI-written summary · about

  1. 0:00Intermediate logging in PyTorch
  2. 1:25PyTorch logging APIs
  3. 2:27FX transforms and TorchScript issues
  4. 3:09Forward hooks for gradients
  5. 4:13Dynamic hook generation
  6. 5:17Compiler code retention tricks
  7. 6:21Buffers vs parameters
  8. 6:43Distributing code with line cache
  9. 7:45Pure pickling with base32
  10. 8:47Torch package dependencies
  11. 9:08Testing transformed models
  12. 9:29Real-world logging fixes
  13. 10:09Demo and acknowledgments
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.