提交 484b3bc8 编写于 作者: N nhzlx

When cudnn version < 7100, there is problem with conv_fusion.

Add check for it.
test=develop
上级 e6218c1d
......@@ -82,10 +82,12 @@ void Main(bool use_gpu) {
int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true);
#if CUDNN_VERSION >= 7100
if (FLAGS_use_gpu) {
paddle::demo::Main(true /*use_gpu*/);
} else {
paddle::demo::Main(false /*use_gpu*/);
}
#endif
return 0;
}
......@@ -144,7 +144,8 @@ if (WITH_ANAKIN AND WITH_MKL) # only needed in CI
endif()
endif()
if(WITH_GPU AND TENSORRT_FOUND)
if (NOT ${CUDNN_VERSION} VERSION_LESS 7100)
if(WITH_GPU AND TENSORRT_FOUND)
set(TRT_MODEL_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/trt")
if (NOT EXISTS ${TRT_MODEL_INSTALL_DIR})
inference_download_and_uncompress(${TRT_MODEL_INSTALL_DIR} ${INFERENCE_URL}/tensorrt_test "trt_test_models.tar.gz")
......@@ -152,4 +153,5 @@ if(WITH_GPU AND TENSORRT_FOUND)
inference_analysis_test(test_trt_models SRCS trt_models_tester.cc
EXTRA_DEPS ${INFERENCE_EXTRA_DEPS}
ARGS --infer_model=${TRT_MODEL_INSTALL_DIR}/trt_test_models SERIAL)
endif()
endif()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册