ATen
ATen copied to clipboard
ATen should manage the current CUDA device
In PyTorch, we have an AutoGPU guard for calling cudaGetDevice appropriately based on input tensors, so that we put the result in the correct tensor. At the moment, we manage calling AutoGPU from Python bindings (e.g., python_variable_methods_dispatch.h
); this means if you use ATen C++ API for multi-GPU, devices will NOT be set correctly; you have to make these calls manually. This is bad; ATen should take care of this for you.
Related #29