“A tour of PyTorch internals” is a great article!
Article in short:

We get a generic C++ tensor and customize it for a particular type of tensor  with split_types function which is available here https://github.com/pytorch/pytorch/blob/cca247635c6edb323176eeac7a18d3e9ab71c558/tools/setup_helpers/split_types.py 20 The tutorial mention that it’s called from setup.py I have not found it there anymore.
The same logic for C++ headers.
Then there is a cwrap that creates C++ methods for particular objects. It uses YAML file to do that. cwrap reads YAML and generate the code for methods.
Tutorial mentions CPython but on Github I found pybind11 to handle interactions of Python and C++.

Could FB make "A Tour of PyTorch Internals (Part III)? We really need updated version. And split_types and cwrap make life really complicated. I don’t know about others but for that I would definitely wait even 30 minutes for PyTorch to build to finally know what happens.
UPDATE: Well it’s already an hour since I build PyTorch from the source.