未验证 提交 155018ee 编写于 作者: D Danyang Zhang 提交者: GitHub

fix the compare in PD_MEA_CHECK_OVERFLOW (#52300)

上级 1faa06f0
...@@ -67,7 +67,7 @@ inline int64_t GetMemoryEfficientBiasStrideB(const phi::DDim &bias_dims, ...@@ -67,7 +67,7 @@ inline int64_t GetMemoryEfficientBiasStrideB(const phi::DDim &bias_dims,
auto __src = (__VA_ARGS__); \ auto __src = (__VA_ARGS__); \
using __SrcType = decltype(&__src); \ using __SrcType = decltype(&__src); \
using __DstType = typename std::remove_reference<decltype(__dst)>::type; \ 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( \ PADDLE_THROW( \
phi::errors::InvalidArgument(#__dst " exceeds maximum value.")); \ phi::errors::InvalidArgument(#__dst " exceeds maximum value.")); \
} \ } \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册