diff --git a/src/tensor_ops/utilities/compatibility.cuh b/src/tensor_ops/utilities/compatibility.cuh index 7da36244a..117c1c494 100644 --- a/src/tensor_ops/utilities/compatibility.cuh +++ b/src/tensor_ops/utilities/compatibility.cuh @@ -14,7 +14,7 @@ // } // #endif -#if __CUDA_ARCH__ < 800 +#if (__CUDACC_VER_MAJOR__ < 12 || __CUDACC_VER_MINOR__ < 2) && __CUDA_ARCH__ < 800 __device__ __forceinline__ __half __hmax_nan(__half a, __half b) { return __hisnan(a) ? a : (__hisnan(b) ? b : __hmax(a, b)); }