I’m trying to find the source code of the operation to move tensors from CPU to GPU in PyTorch:
data = data.to(device)
However, I’ve checked for many places on Github, but cannot find both the Python code and C++ code for this operation. Does anyone know where the function calls and interfaces for moving tensors between devices are defined? Any help would be appreciated!