You are right. Following yours and others advice in this thread 34, I cloned PyTorch’s source, built it with debugging flags, and set a pdb_trace point before backward. However I don’t actually know what happens after Variable._execution_engine.run_backward(), therefore I can’t put a breakpoint using gdb on called C++ function, so that it would stop when it reaches the underlying code.
As for my purpose, while I know autograd’s high level functionality,  I am trying to study/tweak/understand how it is implemented.