diff --git a/external/hipify_torch b/external/hipify_torch index 420084499c..a4337c69fe 160000 --- a/external/hipify_torch +++ b/external/hipify_torch @@ -1 +1 @@ -Subproject commit 420084499c7c1e1c2d801922f40df202eac5f3a0 +Subproject commit a4337c69fe0e2552a7b7b0669178926beeed828c diff --git a/fbgemm_gpu/include/fbgemm_gpu/utils/cuda_prelude.cuh b/fbgemm_gpu/include/fbgemm_gpu/utils/cuda_prelude.cuh index 9b33c895c6..0d18af2f2a 100644 --- a/fbgemm_gpu/include/fbgemm_gpu/utils/cuda_prelude.cuh +++ b/fbgemm_gpu/include/fbgemm_gpu/utils/cuda_prelude.cuh @@ -14,9 +14,9 @@ #ifdef __HIP_PLATFORM_AMD__ #include +#include #include - -#include // @manual +#include #else #include #endif @@ -25,15 +25,9 @@ namespace { inline int get_device_sm_cnt_() { -#ifdef __HIP_PLATFORM_AMD__ - hipDeviceProp_t deviceProp; - hipGetDeviceProperties(&deviceProp, c10::hip::current_device()); - return deviceProp.multiProcessorCount; -#else cudaDeviceProp* deviceProp = at::cuda::getDeviceProperties(c10::cuda::current_device()); return deviceProp->multiProcessorCount; -#endif } } // namespace diff --git a/fbgemm_gpu/include/fbgemm_gpu/utils/kernel_launcher.cuh b/fbgemm_gpu/include/fbgemm_gpu/utils/kernel_launcher.cuh index 6a69702edd..27498b33b2 100644 --- a/fbgemm_gpu/include/fbgemm_gpu/utils/kernel_launcher.cuh +++ b/fbgemm_gpu/include/fbgemm_gpu/utils/kernel_launcher.cuh @@ -229,16 +229,7 @@ struct KernelLauncher { // transformation. auto& launch_registry = -#ifdef __HIPCC__ - // CUDAKernelLaunchRegistry has only been recently added to Torch - // HIPify mappings, so wrap this with USE_ROCM until the mappings land - // in PyTorch OSS. - // - // TODO: Remove when CUDAKernelLaunchRegistry lands in the nightlies - c10::hip::HIPKernelLaunchRegistry::get_singleton_ref(); -#else c10::cuda::CUDAKernelLaunchRegistry::get_singleton_ref(); -#endif // If barrier isolation is enabled, synchronize the stream first before // launching the kernel. This has roughly the same effect as setting