Skip to content

Commit a222d33

Browse files
committed
modify the anakin_model download dir
1 parent 22bc328 commit a222d33

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cmake/external/anakin.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ set(ANAKIN_LIBRARY ${ANAKIN_INSTALL_DIR})
1111
set(ANAKIN_SHARED_LIB ${ANAKIN_LIBRARY}/libanakin.so)
1212
set(ANAKIN_SABER_LIB ${ANAKIN_LIBRARY}/libanakin_saber_common.so)
1313

14+
# TODO(luotao): ANAKIN_MODLE_URL will move to demo ci later.
15+
set(ANAKIN_MODLE_URL "http://paddle-inference-dist.bj.bcebos.com/mobilenet_v2.anakin.bin")
16+
execute_process(COMMAND bash -c "mkdir -p ${ANAKIN_SOURCE_DIR}")
17+
execute_process(COMMAND bash -c "cd ${ANAKIN_SOURCE_DIR}; wget -q --no-check-certificate ${ANAKIN_MODLE_URL}")
18+
1419
include_directories(${ANAKIN_INCLUDE})
1520
include_directories(${ANAKIN_INCLUDE}/saber/)
1621

paddle/fluid/inference/api/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,8 @@ if (WITH_ANAKIN) # only needed in CI
7070
anakin_target(inference_anakin_api)
7171
#anakin_target(inference_anakin_api_shared)
7272
if (WITH_TESTING)
73-
# TODO(luotao): anakin_model will move to demo_ci later
74-
set(ANAKIN_MODLE_URL "http://paddle-inference-dist.bj.bcebos.com/mobilenet_v2.anakin.bin")
75-
execute_process(COMMAND bash -c "wget -q --no-check-certificate ${ANAKIN_MODLE_URL}")
7673
cc_test(inference_anakin_test SRCS api_anakin_engine_tester.cc
77-
ARGS --model=${CMAKE_CURRENT_BINARY_DIR}/mobilenet_v2.anakin.bin
74+
ARGS --model=${ANAKIN_SOURCE_DIR}/mobilenet_v2.anakin.bin
7875
DEPS inference_anakin_api dynload_cuda SERIAL)
7976
target_compile_options(inference_anakin_test BEFORE PUBLIC ${ANAKIN_COMPILE_EXTRA_FLAGS})
8077
endif(WITH_TESTING)

0 commit comments

Comments
 (0)