diff --git a/paddle/fluid/framework/ir/CMakeLists.txt b/paddle/fluid/framework/ir/CMakeLists.txt index 2d7af7df59bd5eb8d7c37125e36a4994527f8af3..70662e9f32e083729f4f08305520cd21fe057e28 100644 --- a/paddle/fluid/framework/ir/CMakeLists.txt +++ b/paddle/fluid/framework/ir/CMakeLists.txt @@ -157,8 +157,6 @@ endif() cc_test(test_cpu_quantize_placement_pass SRCS mkldnn/cpu_quantize_placement_pass_tester.cc DEPS cpu_quantize_placement_pass) cc_test(test_cpu_quantize_pass SRCS mkldnn/cpu_quantize_pass_tester.cc DEPS cpu_quantize_pass naive_executor) cc_test(test_cpu_quantize_squash_pass SRCS mkldnn/cpu_quantize_squash_pass_tester.cc DEPS cpu_quantize_squash_pass naive_executor) - if(NOT WITH_COVERAGE) - cc_test(test_reshape_transpose_matmul_mkldnn_fuse_pass SRCS mkldnn/reshape_transpose_matmul_mkldnn_fuse_pass_tester.cc DEPS reshape_transpose_matmul_mkldnn_fuse_pass) - endif() + cc_test(test_reshape_transpose_matmul_mkldnn_fuse_pass SRCS mkldnn/reshape_transpose_matmul_mkldnn_fuse_pass_tester.cc DEPS reshape_transpose_matmul_mkldnn_fuse_pass) cc_test(test_matmul_transpose_reshape_fuse_pass SRCS mkldnn/matmul_transpose_reshape_fuse_pass_tester.cc DEPS matmul_transpose_reshape_fuse_pass) endif () diff --git a/paddle/fluid/framework/ir/mkldnn/reshape_transpose_matmul_mkldnn_fuse_pass_tester.cc b/paddle/fluid/framework/ir/mkldnn/reshape_transpose_matmul_mkldnn_fuse_pass_tester.cc index a9392b998a9ed9bf28db94cc6eaf043f934fe054..e6c366efa014648e2502500be4b197bfe56fe47f 100644 --- a/paddle/fluid/framework/ir/mkldnn/reshape_transpose_matmul_mkldnn_fuse_pass_tester.cc +++ b/paddle/fluid/framework/ir/mkldnn/reshape_transpose_matmul_mkldnn_fuse_pass_tester.cc @@ -14,7 +14,6 @@ #include "paddle/fluid/framework/ir/mkldnn/reshape_transpose_matmul_mkldnn_fuse_pass.h" -#include #include #include "paddle/fluid/framework/ir/pass_tester_helper.h" @@ -97,11 +96,11 @@ void TestMain(bool with_xshapes) { auto check = [&matmul_op_desc](std::string a) { std::string shape_str = "fused_reshape_" + a; - EXPECT_THAT(matmul_op_desc->GetAttrIfExists>(shape_str), - testing::ElementsAre(0, 0, 12, 64)); + auto shape = matmul_op_desc->GetAttrIfExists>(shape_str); + EXPECT_EQ(shape, (std::vector{0, 0, 12, 64})); std::string axis_str = "fused_transpose_" + a; - EXPECT_THAT(matmul_op_desc->GetAttrIfExists>(axis_str), - testing::ElementsAre(0, 2, 1, 3)); + auto axis = matmul_op_desc->GetAttrIfExists>(axis_str); + EXPECT_EQ(axis, (std::vector{0, 2, 1, 3})); }; check("X"); check("Y");