File tree Expand file tree Collapse file tree 1 file changed +11
-16
lines changed
paddle/fluid/inference/analysis Expand file tree Collapse file tree 1 file changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -21,22 +21,17 @@ cc_library(analysis SRCS
21
21
22
22
cc_test (test_dot SRCS dot_tester.cc DEPS analysis )
23
23
24
- function (inference_analysis_test TARGET )
25
- if (WITH_TESTING )
26
- set (options "" )
27
- set (oneValueArgs "" )
28
- set (multiValueArgs SRCS ARGS EXTRA_DEPS )
29
- cmake_parse_arguments (analysis_test "${options} " "${oneValueArgs} " "${multiValueArgs} " ${ARGN} )
30
- set (mem_opt "" )
31
- if (WITH_GPU )
32
- set (mem_opt "--fraction_of_gpu_memory_to_use=0.5" )
33
- endif ()
34
- cc_test (${TARGET}
35
- SRCS "${analysis_test_SRCS} "
36
- DEPS analysis pass ${GLOB_PASS_LIB} ${analysis_test_EXTRA_DEPS}
37
- ARGS --inference_model_dir=${PYTHON_TESTS_DIR}/book/word2vec.inference.model ${mem_opt} ${analysis_test_ARGS} )
38
- set_tests_properties (${TARGET} PROPERTIES DEPENDS test_word2vec )
39
- endif (WITH_TESTING )
24
+ function (inference_analysis_test TARGET )
25
+ if (WITH_TESTING )
26
+ set (options "" )
27
+ set (oneValueArgs "" )
28
+ set (multiValueArgs SRCS ARGS EXTRA_DEPS )
29
+ cmake_parse_arguments (analysis_test "${options} " "${oneValueArgs} " "${multiValueArgs} " ${ARGN} )
30
+ inference_base_test (${TARGET}
31
+ SRCS ${analysis_test_SRCS}
32
+ DEPS analysis pass ${GLOB_PASS_LIB} ${analysis_test_EXTRA_DEPS}
33
+ ARGS --inference_model_dir=${WORD2VEC_MODEL_DIR} ${analysis_test_ARGS} )
34
+ endif ()
40
35
endfunction (inference_analysis_test )
41
36
42
37
inference_analysis_test (test_analyzer SRCS analyzer_tester.cc EXTRA_DEPS paddle_inference_api )
You can’t perform that action at this time.
0 commit comments