From 7a0cc0a99996d6449256b08d4c7e4360d8fdd724 Mon Sep 17 00:00:00 2001 From: Huihuang Zheng Date: Thu, 11 Nov 2021 15:16:29 +0800 Subject: [PATCH] Add test property RUN_TYPE=CINN (#37114) Add test property RUN_TYPE=CINN to CINN unit tests. It will restrict Paddle-CINN CI to run these unit tests only. --- paddle/fluid/framework/ir/CMakeLists.txt | 3 --- paddle/fluid/framework/paddle2cinn/CMakeLists.txt | 12 ++++++++++++ .../framework/{ir => paddle2cinn}/cinn_lib_test.cc | 0 3 files changed, 12 insertions(+), 3 deletions(-) rename paddle/fluid/framework/{ir => paddle2cinn}/cinn_lib_test.cc (100%) diff --git a/paddle/fluid/framework/ir/CMakeLists.txt b/paddle/fluid/framework/ir/CMakeLists.txt index 49bc8c908c9..e384cb46337 100644 --- a/paddle/fluid/framework/ir/CMakeLists.txt +++ b/paddle/fluid/framework/ir/CMakeLists.txt @@ -145,9 +145,6 @@ cc_test(pass_test SRCS pass_test.cc DEPS graph pass graph_helper) cc_test(graph_test SRCS graph_test.cc DEPS graph graph_helper op_registry) cc_test(graph_helper_test SRCS graph_helper_test.cc DEPS graph graph_helper op_registry) cc_test(graph_to_program_pass_test SRCS graph_to_program_pass_test.cc DEPS graph_to_program_pass) -if (WITH_CINN) - cc_test(cinn_lib_test SRCS cinn_lib_test.cc DEPS cinn) -endif() cc_test(cost_model_test SRCS cost_model_test.cc DEPS cost_model op_registry) cc_test(test_graph_pattern_detector SRCS graph_pattern_detector_tester.cc DEPS graph_pattern_detector) cc_test(test_op_compat_sensible_pass SRCS op_compat_sensible_pass_tester.cc DEPS op_compat_sensible_pass) diff --git a/paddle/fluid/framework/paddle2cinn/CMakeLists.txt b/paddle/fluid/framework/paddle2cinn/CMakeLists.txt index 6eef1a00e1e..b80a265f8a4 100644 --- a/paddle/fluid/framework/paddle2cinn/CMakeLists.txt +++ b/paddle/fluid/framework/paddle2cinn/CMakeLists.txt @@ -4,8 +4,20 @@ cc_library(transform_desc SRCS transform_desc.cc DEPS proto_desc cinn) cc_library(cinn_graph_symbolization SRCS cinn_graph_symbolization.cc DEPS lod_tensor graph transform_desc cinn) cc_library(cinn_compiler SRCS cinn_compiler.cc DEPS framework_proto graph lod_tensor cinn_cache_key cinn_graph_symbolization cinn) +cc_test(cinn_lib_test SRCS cinn_lib_test.cc DEPS cinn) +set_tests_properties(cinn_lib_test PROPERTIES LABELS "RUN_TYPE=CINN") + cc_test(cinn_cache_key_test SRCS cinn_cache_key_test.cc DEPS cinn_cache_key) +set_tests_properties(cinn_cache_key_test PROPERTIES LABELS "RUN_TYPE=CINN") + cc_test(build_cinn_pass_test SRCS build_cinn_pass_test.cc DEPS build_cinn_pass cinn_compiler) +set_tests_properties(build_cinn_pass_test PROPERTIES LABELS "RUN_TYPE=CINN") + cc_test(transform_desc_test SRCS transform_desc_test.cc DEPS transform_desc) +set_tests_properties(transform_desc_test PROPERTIES LABELS "RUN_TYPE=CINN") + cc_test(cinn_graph_symbolization_test SRCS cinn_graph_symbolization_test.cc DEPS cinn_graph_symbolization) +set_tests_properties(cinn_graph_symbolization_test PROPERTIES LABELS "RUN_TYPE=CINN") + cc_test(cinn_compiler_test SRCS cinn_compiler_test.cc DEPS cinn_compiler place proto_desc graph_viz_pass build_cinn_pass cinn) +set_tests_properties(cinn_compiler_test PROPERTIES LABELS "RUN_TYPE=CINN") diff --git a/paddle/fluid/framework/ir/cinn_lib_test.cc b/paddle/fluid/framework/paddle2cinn/cinn_lib_test.cc similarity index 100% rename from paddle/fluid/framework/ir/cinn_lib_test.cc rename to paddle/fluid/framework/paddle2cinn/cinn_lib_test.cc -- GitLab