Skip to content

Commit

Permalink
fix the compare in PD_MEA_CHECK_OVERFLOW (#52300)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangDY-6483 authored Mar 30, 2023
1 parent 1faa06f commit 155018e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<decltype(__dst)>::type; \
if (__src < std::numeric_limits<__DstType>::max()) { \
if (__src > std::numeric_limits<__DstType>::max()) { \
PADDLE_THROW( \
phi::errors::InvalidArgument(#__dst " exceeds maximum value.")); \
} \
Expand Down

0 comments on commit 155018e

Please sign in to comment.