I wanted to look at the source code of torch.cuda.caching_allocator_alloc()
. I followed the link which led me to the function declaration
def _cuda_cudaCachingAllocator_raw_alloc(size: _int, cuda_stream: _int)
in the file:
python3.9/site-packages/torch/_C/__init__.pyi
This file consists has a comment above the function declaration
# Defined in torch/csrc/cuda/Module.cpp
However, I don’t see a folder named csrc
in torch
. How can I view the source code?