diff --git a/csrc/includes/patch/hip/hcc_detail/hip_cooperative_groups.h b/csrc/includes/patch/hip/hcc_detail/hip_cooperative_groups.h index ddd6a6bb545a..d69520e173f9 100644 --- a/csrc/includes/patch/hip/hcc_detail/hip_cooperative_groups.h +++ b/csrc/includes/patch/hip/hcc_detail/hip_cooperative_groups.h @@ -35,7 +35,7 @@ THE SOFTWARE. //#if __cplusplus #if __cplusplus && defined(__clang__) && defined(__HIP__) #include -#if ROCM_VERSION_MINOR < 4 +#if ROCM_VERSION_MAJOR < 5 and ROCM_VERSION_MINOR < 4 #include #endif namespace cooperative_groups { diff --git a/csrc/includes/patch/hip/hcc_detail/hip_cooperative_groups_helper.h b/csrc/includes/patch/hip/hcc_detail/hip_cooperative_groups_helper.h index 38763da4221b..5d438647d3fd 100644 --- a/csrc/includes/patch/hip/hcc_detail/hip_cooperative_groups_helper.h +++ b/csrc/includes/patch/hip/hcc_detail/hip_cooperative_groups_helper.h @@ -33,7 +33,7 @@ THE SOFTWARE. #if __cplusplus -#if ROCM_VERSION_MINOR < 4 +#if ROCM_VERSION_MAJOR < 5 and ROCM_VERSION_MINOR < 4 #include #include #else diff --git a/csrc/lamb/fused_lamb_cuda_kernel.cu b/csrc/lamb/fused_lamb_cuda_kernel.cu index e12b2c8585b4..e934b69c0382 100644 --- a/csrc/lamb/fused_lamb_cuda_kernel.cu +++ b/csrc/lamb/fused_lamb_cuda_kernel.cu @@ -508,7 +508,7 @@ void fused_lamb_cuda(at::Tensor& p, lamb_coeff.data()); })); } - THCudaCheck(cudaGetLastError()); + C10_CUDA_CHECK(cudaGetLastError()); } // template __device__ void reduce_two_vectors_in_register(float a, float b, float* g_a,