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.
tensor
![image-20200521140633255](https://tva1.sinaimg.cn/large/007S8ZIlly1gf01f660y3j30q00lcju3.jpg)
strides,跟物理内存有关,跟实际元素的使用有关
![image-20200521141246243](https://tva1.sinaimg.cn/large/007S8ZIlly1gf01lfjdqlj30w60man14.jpg)
Every tensor records an offset, but most of the time it’s zero, and I’ll omit it from my diagrams when that’s the case.
stride !=1 means we skip elements
tensor是一个logic view
extensions
![image-20200521142040136](https://tva1.sinaimg.cn/large/007S8ZIlly1gf01tngxzkj310o0noq8a.jpg)
分层,针对自己想要加的
autograd
![image-20200521142935547](https://tva1.sinaimg.cn/large/007S8ZIlly1gf022xncxxj30vc0hmgos.jpg)
source
![image-20200521143041600](https://tva1.sinaimg.cn/large/007S8ZIlly1gf0242z3dyj30yo0nc44w.jpg)
![image-20200521143541802](https://tva1.sinaimg.cn/large/007S8ZIlly1gf029aa3kwj311i0nqk01.jpg)
按照这个层次和流程,通过pytorch operator来改写