From 52ba6ac934a24a2bb784254ffb30ed634d27a5db Mon Sep 17 00:00:00 2001 From: wufeisheng Date: Mon, 27 Nov 2023 15:59:08 +0800 Subject: [PATCH] fix build error --- paddle/fluid/operators/fused/layernorm_quant_dequant.h | 4 ++++ 1 file changed, 4 insertions(+) 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