TGViewer
Artem Ryblov’s Data Science Weekly Artem Ryblov’s Data Science Weekly @data_science_weekly · 684 subscribers
Post #202 712
PyTorch internals

This talk is for those of you who have used PyTorch, and thought to yourself, "It would be great if I could contribute to PyTorch," but were scared by PyTorch's behemoth of a C++ codebase. I'm not going to lie: the PyTorch codebase can be a bit overwhelming at times. The purpose of this talk is to put a map in your hands: to tell you about the basic conceptual structure of a "tensor library that supports automatic differentiation", and give you some tools and tricks for finding your way around the codebase. I'm going to assume that you've written some PyTorch before, but haven't necessarily delved deeper into how a machine learning library is written.

The talk is in two parts: in the first part, I'm going to first introduce you to the conceptual universe of a tensor library. I'll start by talking about the tensor data type you know and love, and give a more detailed discussion about what exactly this data type provides, which will lead us to a better understanding of how it is actually implemented under the hood. If you're an advanced user of PyTorch, you'll be familiar with most of this material. We'll also talk about the trinity of "extension points", layout, device and dtype, which guide how we think about extensions to the tensor class. In the live talk at PyTorch NYC, I skipped the slides about autograd, but I'll talk a little bit about them in these notes as well.

The second part grapples with the actual nitty gritty details involved with actually coding in PyTorch. I'll tell you how to cut your way through swaths of autograd code, what code actually matters and what is legacy, and also all of the cool tools that PyTorch gives you for writing kernels.


Link: Site

Navigational hashtags: #armknowledgesharing #armtutorials
General hashtags: #dl #deeplearning #pytorch

@data_science_weekly
  • 👍 5
More from @data_science_weekly
  1. Sep 20, 2026Reliable Machine Learning: Applying SRE Principles to ML in Production by Cathy Chen, Nial…
  2. Sep 13, 2026A Short Note on P-Value Hacking by Nassim Nicholas Taleb The paper works out the exact pro…
  3. Sep 6, 2026SQLBolt — Learn SQL with simple, interactive exercises Every lesson runs a database in the…
  4. Aug 16, 2026Machine Learning by Neetcode Solve ML problems from scratch, from gradient descent to a wo…
  5. Aug 9, 2026CS 224V Conversational Virtual Assistants with Deep Learning by Stanford University Genera…
  6. Aug 3, 2026A Visual Guide to Quantization As their name suggests, Large Language Models (LLMs) are of…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →