File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
paddle/fluid/inference/api Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,17 @@ if(WITH_GPU)
103
103
endif ()
104
104
if (WITH_ANAKIN )
105
105
if (${CUDA_VERSION_MAJOR} VERSION_LESS 8 )
106
- message (FATAL_ERROR "Anakin needs CUDA >= 8.0 to compile" )
106
+ message (WARNING "Anakin needs CUDA >= 8.0 to compile. Force WITH_ANAKIN=OFF" )
107
+ set (WITH_ANAKIN OFF CACHE STRING "Anakin is valid only when CUDA >= 8.0." FORCE )
107
108
endif ()
108
109
if (${CUDNN_MAJOR_VERSION} VERSION_LESS 7 )
109
- message (FATAL_ERROR "Anakin needs CUDNN >= 7.0 to compile" )
110
+ message (WARNING "Anakin needs CUDNN >= 7.0 to compile. Force WITH_ANAKIN=OFF" )
111
+ set (WITH_ANAKIN OFF CACHE STRING "Anakin is valid only when CUDNN >= 7.0." FORCE )
110
112
endif ()
113
+ endif ()
114
+ if (WITH_ANAKIN )
111
115
set (ENV{CUDNN_INCLUDE_DIR} ${CUDNN_INCLUDE_DIR} )
112
116
set (ENV{CUDNN_LIBRARY} ${CUDNN_LIBRARY} )
113
- message (STATUS "cudnn include header is ${CUDNN_INCLUDE_DIR} /cudnn.h" )
114
- message (STATUS "cudnn library is ${CUDNN_LIBRARY} " )
115
117
endif ()
116
118
elseif (WITH_AMD_GPU )
117
119
add_definitions (-DPADDLE_WITH_HIP )
Original file line number Diff line number Diff line change @@ -62,13 +62,13 @@ endif()
62
62
63
63
if (WITH_ANAKIN AND WITH_GPU ) # only needed in CI
64
64
# compile the libinference_anakin_api.a and anakin.so.
65
- nv_library (inference_anakin_api SRCS api.cc api_anakin_engine.cc DEPS anakin_shared anakin_saber )
66
- # nv_library (inference_anakin_api_shared SHARED SRCS api.cc api_anakin_engine.cc DEPS anakin )
65
+ cc_library (inference_anakin_api SRCS api.cc api_anakin_engine.cc DEPS anakin_shared anakin_saber )
66
+ cc_library (inference_anakin_api_shared SHARED SRCS api.cc api_anakin_engine.cc DEPS anakin_shared anakin_saber )
67
67
function (anakin_target target_name )
68
68
target_compile_options (${target_name} BEFORE PUBLIC ${ANAKIN_COMPILE_EXTRA_FLAGS} )
69
69
endfunction ()
70
70
anakin_target (inference_anakin_api )
71
- # anakin_target(inference_anakin_api_shared)
71
+ anakin_target (inference_anakin_api_shared )
72
72
if (WITH_TESTING )
73
73
cc_test (inference_anakin_test SRCS api_anakin_engine_tester.cc
74
74
ARGS --model=${ANAKIN_SOURCE_DIR}/mobilenet_v2.anakin.bin
You can’t perform that action at this time.
0 commit comments