The old binding method described in http://pytorch.org/2017/05/11/Internals.html 4 is removed in current master branch, so functions like THPIntTensor_init() is no longer in torch/csrc/Module.cpp. I found the removal commit, 48a3349c29f1a8a6e1d9d9ad6108e5c15aaeb583, but it’s a massive code clean up so I can’t understand the new method by looking at that commit.
My problem is I can’t find the related code for forwarding python call to c code. I tried to use gdb to watch the execution flow, but I don’t know where to set the break point since I don’t know where is the binding entry…
Please give me some pointers to the new internal binding method, like which portions of code are responsible for initializing all tensor methods, where are those bindings generated and the glue for translating python calls to methods in c++ class Type. I don’t want to waste you too much time, give me some pointers to the code and I will read it myself. Or even better if you can give me some hints for how to use debugging tools to find them.
Thanks.