From fea05f1f447379a165548d6a2a2a945f941871b2 Mon Sep 17 00:00:00 2001 From: YUNSHEN XIE <1084314248@qq.com> Date: Tue, 19 Jul 2022 14:08:06 +0800 Subject: [PATCH] add labels for infer ut (#44279) * add labels for infer ut * add RUN_TYPE=INFER for cpp ut * fix formaterror * update --- paddle/fluid/inference/analysis/CMakeLists.txt | 2 ++ python/paddle/fluid/tests/unittests/ir/CMakeLists.txt | 1 + .../fluid/tests/unittests/ir/inference/CMakeLists.txt | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/paddle/fluid/inference/analysis/CMakeLists.txt b/paddle/fluid/inference/analysis/CMakeLists.txt index 67f0e3212db43..10d67c69f1344 100644 --- a/paddle/fluid/inference/analysis/CMakeLists.txt +++ b/paddle/fluid/inference/analysis/CMakeLists.txt @@ -65,6 +65,7 @@ function(inference_analysis_test_run TARGET) "${multiValueArgs}" ${ARGN}) inference_base_test_run(${TARGET} COMMAND ${analysis_test_COMMAND} ARGS ${analysis_test_ARGS}) + set_tests_properties(${TARGET} PROPERTIES LABELS "RUN_TYPE=INFER") endif() endfunction() @@ -86,6 +87,7 @@ function(inference_analysis_test TARGET) ${GLOB_PASS_LIB}) inference_base_test_run(${TARGET} COMMAND ${TARGET} ARGS ${analysis_test_ARGS}) + set_tests_properties(${TARGET} PROPERTIES LABELS "RUN_TYPE=INFER") endif() endfunction() diff --git a/python/paddle/fluid/tests/unittests/ir/CMakeLists.txt b/python/paddle/fluid/tests/unittests/ir/CMakeLists.txt index 58a3c8f987e7e..732a70069a1ab 100644 --- a/python/paddle/fluid/tests/unittests/ir/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/ir/CMakeLists.txt @@ -12,6 +12,7 @@ endif() foreach(target ${TEST_IR_PASSES}) py_test_modules(${target} MODULES ${target}) + set_tests_properties(${target} PROPERTIES LABELS "RUN_TYPE=INFER") endforeach() add_subdirectory(inference) diff --git a/python/paddle/fluid/tests/unittests/ir/inference/CMakeLists.txt b/python/paddle/fluid/tests/unittests/ir/inference/CMakeLists.txt index 7a67bf95d15a8..085ed55a979be 100755 --- a/python/paddle/fluid/tests/unittests/ir/inference/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/ir/inference/CMakeLists.txt @@ -59,15 +59,18 @@ if(WITH_GPU AND TENSORRT_FOUND) "7.1") py_test_modules(${target} MODULES ${target}) set_tests_properties(${target} PROPERTIES TIMEOUT 60) + set_tests_properties(${target} PROPERTIES LABELS "RUN_TYPE=INFER") endif() else() py_test_modules(${target} MODULES ${target}) + set_tests_properties(${target} PROPERTIES LABELS "RUN_TYPE=INFER") endif() endforeach() foreach(target ${TEST_TRT_CONVERTER}) py_test_modules(${target} MODULES ${target}) set_tests_properties(${target} PROPERTIES TIMEOUT 300) + set_tests_properties(${target} PROPERTIES LABELS "RUN_TYPE=INFER") endforeach() endif() @@ -83,6 +86,7 @@ endforeach() if(WITH_MKLDNN) foreach(target ${TEST_MKLDNN_IR_PASSES}) py_test_modules(${target} MODULES ${target}) + set_tests_properties(${target} PROPERTIES LABELS "RUN_TYPE=INFER") endforeach() endif() @@ -91,6 +95,7 @@ if(WITH_MKLDNN AND WITH_GPU) foreach(target ${TEST_INFERENCE_IR_PASSES}) py_test_modules(${target} MODULES ${target}) + set_tests_properties(${target} PROPERTIES LABELS "RUN_TYPE=INFER") endforeach() endif() @@ -99,6 +104,7 @@ if(NOT WITH_MKLDNN AND NOT WITH_GPU) foreach(target ${TEST_INFERENCE_CPU_UT}) py_test_modules(${target} MODULES ${target}) + set_tests_properties(${target} PROPERTIES LABELS "RUN_TYPE=INFER") endforeach() set_tests_properties(test_mul_lstm_fuse_pass PROPERTIES TIMEOUT 300)