提交 96413249 编写于 作者: N nhzlx

fix comments

test=develop
上级 484b3bc8
...@@ -82,12 +82,10 @@ void Main(bool use_gpu) { ...@@ -82,12 +82,10 @@ void Main(bool use_gpu) {
int main(int argc, char** argv) { int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true); google::ParseCommandLineFlags(&argc, &argv, true);
#if CUDNN_VERSION >= 7100
if (FLAGS_use_gpu) { if (FLAGS_use_gpu) {
paddle::demo::Main(true /*use_gpu*/); paddle::demo::Main(true /*use_gpu*/);
} else { } else {
paddle::demo::Main(false /*use_gpu*/); paddle::demo::Main(false /*use_gpu*/);
} }
#endif
return 0; return 0;
} }
...@@ -158,9 +158,12 @@ class GpuPassStrategy : public PassStrategy { ...@@ -158,9 +158,12 @@ class GpuPassStrategy : public PassStrategy {
"conv_affine_channel_fuse_pass", // "conv_affine_channel_fuse_pass", //
"conv_eltwiseadd_affine_channel_fuse_pass", // "conv_eltwiseadd_affine_channel_fuse_pass", //
"conv_bn_fuse_pass", // "conv_bn_fuse_pass", //
#if CUDNN_VERSION >= 7100 // To run conv_fusion, the version of cudnn must be
// guaranteed at least v7
"conv_elementwise_add_act_fuse_pass", // "conv_elementwise_add_act_fuse_pass", //
"conv_elementwise_add2_act_fuse_pass", // "conv_elementwise_add2_act_fuse_pass", //
"conv_elementwise_add_fuse_pass", // "conv_elementwise_add_fuse_pass", //
#endif
}); });
for (int i = 6; i >= 3; i--) { for (int i = 6; i >= 3; i--) {
......
...@@ -144,8 +144,7 @@ if (WITH_ANAKIN AND WITH_MKL) # only needed in CI ...@@ -144,8 +144,7 @@ if (WITH_ANAKIN AND WITH_MKL) # only needed in CI
endif() endif()
endif() endif()
if (NOT ${CUDNN_VERSION} VERSION_LESS 7100) if(WITH_GPU AND TENSORRT_FOUND)
if(WITH_GPU AND TENSORRT_FOUND)
set(TRT_MODEL_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/trt") set(TRT_MODEL_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/trt")
if (NOT EXISTS ${TRT_MODEL_INSTALL_DIR}) if (NOT EXISTS ${TRT_MODEL_INSTALL_DIR})
inference_download_and_uncompress(${TRT_MODEL_INSTALL_DIR} ${INFERENCE_URL}/tensorrt_test "trt_test_models.tar.gz") inference_download_and_uncompress(${TRT_MODEL_INSTALL_DIR} ${INFERENCE_URL}/tensorrt_test "trt_test_models.tar.gz")
...@@ -153,5 +152,4 @@ if (NOT ${CUDNN_VERSION} VERSION_LESS 7100) ...@@ -153,5 +152,4 @@ if (NOT ${CUDNN_VERSION} VERSION_LESS 7100)
inference_analysis_test(test_trt_models SRCS trt_models_tester.cc inference_analysis_test(test_trt_models SRCS trt_models_tester.cc
EXTRA_DEPS ${INFERENCE_EXTRA_DEPS} EXTRA_DEPS ${INFERENCE_EXTRA_DEPS}
ARGS --infer_model=${TRT_MODEL_INSTALL_DIR}/trt_test_models SERIAL) ARGS --infer_model=${TRT_MODEL_INSTALL_DIR}/trt_test_models SERIAL)
endif()
endif() endif()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册