3 #include <caffe2/core/types.h> 8 #include <caffe2/core/common_gpu.h> 10 #if __HIP_DEVICE_COMPILE__ 11 #include <caffe2/core/hip/common_gpu.h> 16 #if defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__) || defined(__HIP__) 17 #define CONVERSIONS_DECL __host__ __device__ inline 19 #define CONVERSIONS_DECL inline 26 template <
typename IN,
typename OUT>
27 CONVERSIONS_DECL OUT To(
const IN in) {
28 return static_cast<OUT
>(in);
31 template <
typename OUT,
typename IN>
32 CONVERSIONS_DECL OUT Get(IN x) {
33 return static_cast<OUT
>(x);
40 #undef CONVERSIONS_DECL A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...