From aaa5e4054f8bf2da349e246929639de8e9c6d00c Mon Sep 17 00:00:00 2001 From: ZhangDY-6483 Date: Wed, 29 Mar 2023 17:41:56 +0800 Subject: [PATCH] fix the compare in PD_MEA_CHECK_OVERFLOW --- .../kernels/fusion/cutlass/memory_efficient_attention_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/phi/kernels/fusion/cutlass/memory_efficient_attention_utils.h b/paddle/phi/kernels/fusion/cutlass/memory_efficient_attention_utils.h index 6795e9d4c0a31..beb0bdd770aa4 100644 --- a/paddle/phi/kernels/fusion/cutlass/memory_efficient_attention_utils.h +++ b/paddle/phi/kernels/fusion/cutlass/memory_efficient_attention_utils.h @@ -67,7 +67,7 @@ inline int64_t GetMemoryEfficientBiasStrideB(const phi::DDim &bias_dims, auto __src = (__VA_ARGS__); \ using __SrcType = decltype(&__src); \ using __DstType = typename std::remove_reference::type; \ - if (__src < std::numeric_limits<__DstType>::max()) { \ + if (__src > std::numeric_limits<__DstType>::max()) { \ PADDLE_THROW( \ phi::errors::InvalidArgument(#__dst " exceeds maximum value.")); \ } \