I’m interested in examining the implementation of some PyTorch functions (in my case especially torch.histc()), but I feel overwhelmed by the code base. I tracked their first occurrence to these lines in torch.__init__.py:
for name in dir(_C._VariableFunctions):
    globals()[name] = getattr(_C._VariableFunctions, name)

So it seems the functions are defined within the C extension. I then looked through every file in the torch package (by algorithm of course) to find the usage of the string histc. The following files turned up:

lib/include/TH/generic/THTensorMath.h
lib/include/ATen/Functions.h
lib/include/ATen/TensorMethods.h
lib/include/ATen/Tensor.h
lib/include/ATen/Type.h
lib/include/ATen/CPUFloatType.h
lib/include/ATen/CPUDoubleType.h

I’m not that proficient in C, but as far as I can tell only the prototypes are defined in these files, which makes sense for header files.
Hence I’m still on the hunt for the actual implementation. Can someone point me in the right direction?