diff --git a/paddle/fluid/operators/fused/layernorm_quant_dequant.h b/paddle/fluid/operators/fused/layernorm_quant_dequant.h index befcccffca9cd..44db4824fad88 100644 --- a/paddle/fluid/operators/fused/layernorm_quant_dequant.h +++ b/paddle/fluid/operators/fused/layernorm_quant_dequant.h @@ -94,12 +94,16 @@ __inline__ __device__ T Max(T a, T b) { template <> __inline__ __device__ __nv_bfloat16 Max<__nv_bfloat16>(__nv_bfloat16 a, __nv_bfloat16 b) { +#if __CUDA_ARCH__ >= 800 return __hmax(a, b); +#endif } template <> __inline__ __device__ half Max(half a, half b) { +#if __CUDA_ARCH__ >= 800 return __hmax(a, b); +#endif } template