• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <ATen/hip/impl/HIPGuardImplMasqueradingAsCUDA.h>
2 
3 // THIS IS A MASSIVE HACK.  This will BREAK you Caffe2 CUDA code if you
4 // load ATen_hip, even if you don't ever actually use ATen_hip at runtime.
5 //
6 // If you ever link ATen_hip statically into the full library along
7 // with ATen_cuda (libomnibus), the loading order of this versus the regular
8 // ATen_cuda will be nondeterministic, and you'll nondeterministically get
9 // one or the other.  (This will be obvious because all of your code
10 // will fail.)
11 //
12 // This hack can be removed once PyTorch is out-of-place HIPified, and
13 // doesn't pretend CUDA is HIP.
14 C10_REGISTER_GUARD_IMPL(CUDA, at::cuda::HIPGuardImplMasqueradingAsCUDA);
15