diff --git a/cmake/external/gtest.cmake b/cmake/external/gtest.cmake index 9b19d57136045e6e59a36e4a8ffcd12b409279f8..3d79b154b80f4522f2d18de7b5bb463139b91e12 100644 --- a/cmake/external/gtest.cmake +++ b/cmake/external/gtest.cmake @@ -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} diff --git a/paddle/fluid/operators/fused/fusion_seqconv_eltadd_relu_op.cc b/paddle/fluid/operators/fused/fusion_seqconv_eltadd_relu_op.cc index cd481bc0c282f9d87ac551f50ed209244937c03f..ab74df426a74780372564c95f3ffad745f667db9 100644 --- a/paddle/fluid/operators/fused/fusion_seqconv_eltadd_relu_op.cc +++ b/paddle/fluid/operators/fused/fusion_seqconv_eltadd_relu_op.cc @@ -159,8 +159,8 @@ class FusionSeqConvEltAddReluKernel : public framework::OpKernel { auto* col = ctx.Output("ColMat"); auto x_lod = x->lod(); - auto x_dims = x->dims(); - auto w_dims = w->dims(); + auto x_dims = phi::vectorize(x->dims()); + auto w_dims = phi::vectorize(w->dims()); PADDLE_ENFORCE_EQ( b->numel(), w_dims[1],