Skip to content

Commit 9e0a94f

Browse files
authored
inference-api code clean (#12274)
1 parent 95a2b5f commit 9e0a94f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

paddle/fluid/inference/api/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ endif()
2626
function(inference_api_test TARGET_NAME)
2727
if (WITH_TESTING)
2828
set(options "")
29-
set(oneValueArgs "")
29+
set(oneValueArgs SRC)
3030
set(multiValueArgs ARGS)
3131
cmake_parse_arguments(inference_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
3232

3333
set(PYTHON_TESTS_DIR ${PADDLE_BINARY_DIR}/python/paddle/fluid/tests)
3434
cc_test(${TARGET_NAME}
35-
SRCS ${TARGET_NAME}.cc
35+
SRCS ${inference_test_SRC}
3636
DEPS "${inference_deps}"
3737
ARGS --dirname=${PYTHON_TESTS_DIR}/book/)
3838
if(inference_test_ARGS)
@@ -73,24 +73,24 @@ if(NOT APPLE)
7373
endif()
7474

7575
cc_test(test_paddle_inference_api
76-
SRCS test_api.cc
76+
SRCS api_tester.cc
7777
DEPS paddle_inference_api)
7878

79-
inference_api_test(test_api_impl
79+
inference_api_test(test_api_impl SRC api_impl_tester.cc
8080
ARGS test_word2vec test_image_classification)
8181

8282
if(WITH_GPU AND TENSORRT_FOUND)
8383
cc_library(paddle_inference_tensorrt_subgraph_engine
8484
SRCS api_tensorrt_subgraph_engine.cc
8585
DEPS paddle_inference_api analysis tensorrt_engine paddle_inference_api paddle_fluid_api tensorrt_converter)
8686

87-
inference_api_test(test_api_tensorrt_subgraph_engine ARGS test_word2vec)
87+
inference_api_test(test_api_tensorrt_subgraph_engine SRC api_tensorrt_subgraph_engine_tester.cc ARGS test_word2vec)
8888
endif()
8989

9090
if (WITH_ANAKIN) # only needed in CI
9191
# Due to Anakin do not have official library releases and the versions of protobuf and cuda do not match Paddle's,
9292
# so anakin library will not be merged to our official inference library. To use anakin prediction API, one need to
93-
# compile the libinference_anakin_api.a and compile with anakin.so.
93+
# compile the libinference_anakin_api.a and anakin.so.
9494
nv_library(inference_anakin_api SRCS api.cc api_anakin_engine.cc)
9595
nv_library(inference_anakin_api_shared SHARED SRCS api.cc api_anakin_engine.cc)
9696
target_compile_options(inference_anakin_api BEFORE PUBLIC ${ANAKIN_COMPILE_EXTRA_FLAGS})

0 commit comments

Comments
 (0)