pytorch
24ce3a7c - Move `hasPrimaryContext` to `c10::cuda` (#96800)

Commit
1 year ago
Move `hasPrimaryContext` to `c10::cuda` (#96800) This method has to be accessible from `c10` to enable CUDA-12 integration. Implemented by providing private `c10::cuda:_internal::setHasPrimaryContext` that passes the pointer to the implementation (in `torch_cuda`) back to c10. Use global class constructor/destructor to guarantee RAII. Pull Request resolved: https://github.com/pytorch/pytorch/pull/96800 Approved by: https://github.com/ngimel
Author
Committer
Parents
Loading