未验证 提交 66a4804b 编写于 作者: R risemeup1 提交者: GitHub

fix gcc12 error (#52646)

上级 fd6a0607
......@@ -63,7 +63,7 @@ if(WITH_MKLML)
# wait for mklml downloading completed
set(GTEST_DEPENDS ${MKLML_PROJECT})
endif()
if(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 12.0)
if(NOT WIN32 AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 12.0)
file(TO_NATIVE_PATH
${PADDLE_SOURCE_DIR}/patches/gtest/gtest-death-test.cc.patch native_src)
set(GTEST_PATCH_COMMAND patch -d ${GTEST_SOURCE_DIR}/googletest/src <
......@@ -77,6 +77,7 @@ ExternalProject_Add(
DEPENDS ${GTEST_DEPENDS}
PREFIX ${GTEST_PREFIX_DIR}
UPDATE_COMMAND ""
PATCH_COMMAND ${GTEST_PATCH_COMMAND}
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS}
......
......@@ -159,8 +159,8 @@ class FusionSeqConvEltAddReluKernel : public framework::OpKernel<T> {
auto* col = ctx.Output<phi::DenseTensor>("ColMat");
auto x_lod = x->lod();
auto x_dims = x->dims();
auto w_dims = w->dims();
auto x_dims = phi::vectorize<int64_t>(x->dims());
auto w_dims = phi::vectorize<int64_t>(w->dims());
PADDLE_ENFORCE_EQ(
b->numel(),
w_dims[1],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册