ATen icon indicating copy to clipboard operation
ATen copied to clipboard

ATen should manage the current CUDA device

Open ezyang opened this issue 6 years ago • 0 comments

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

ezyang avatar Nov 10 '17 08:11 ezyang