Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardWooSJTU committed Nov 27, 2023
1 parent 45ac71d commit 52ba6ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions paddle/fluid/operators/fused/layernorm_quant_dequant.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>(half a, half b) {
#if __CUDA_ARCH__ >= 800
return __hmax(a, b);
#endif
}

template <typename T>
Expand Down

0 comments on commit 52ba6ac

Please sign in to comment.