A PyTorchy way of doing this would be to work on a module basis, e.g. using the brand new FX facility or a JIT representation and mutate the module / JIT graph.
That said, the outmost C++ entry points are convXd found via native_functions.yaml. I once blogged about some details of how Python maps to C++, it’s old, but save the location of derivatives it’s still mostly accurate.
Best regards
Thomas