PyTorch Developer Podcast
PyTorch Developer Podcast
Edward Yang, Team PyTorch
Jul 9, 2021 · 21 min

API design via lexical and dynamic scoping

MP3

Lexical and dynamic scoping are useful tools to reason about various API design choices in PyTorch, related to context managers, global flags, dynamic dispatch, and how to deal with BC-breaking changes. I'll walk through three case studies, one from Python itself (changing the meaning of division to true division), and two from PyTorch (device context managers, and torch function for factory functions).

Further reading.

This podcast uses Simplecast for stats and dynamic audio. What this means Episodes play from the podcast's own servers, unmodified. Not affiliated with Podbay.