From 155018ee5095c4cdc5a0a99554de91c4df1721de Mon Sep 17 00:00:00 2001 From: Danyang Zhang <64682152+ZhangDY-6483@users.noreply.github.com> Date: Thu, 30 Mar 2023 10:37:43 +0800 Subject: [PATCH] fix the compare in PD_MEA_CHECK_OVERFLOW (#52300) --- .../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 6795e9d4c0a..beb0bdd770a 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.")); \ } \ -- GitLab