How the autograd is implmented in pytorch

Hi,

I am currently trying to understand the PyTorch codebase. For now, the implementations of the Linear layer, for example, are described by these two files in GitHub repos, but I can’t understand how the operations are stored for the computational graph.

You might be interested in
https://blog.ezyang.com/2019/05/pytorch-internals/
http://blog.ezyang.com/2020/09/lets-talk-about-the-pytorch-dispatcher/

Short answer is that there will be some additional logic that interposes to track the operations everytime you run an operation.

Thanks for the response the articles are very interesting in fact what i am interested in is knowing at a deep level the in and out of pytorch as i wan to go from a intermediate level into upper intermediate in both pytorch and deep learning

1 Like