diff --git a/deploy/cpp/src/test_seg.cc b/deploy/cpp/src/test_seg.cc index 5224f48114..e06ba7f04b 100644 --- a/deploy/cpp/src/test_seg.cc +++ b/deploy/cpp/src/test_seg.cc @@ -16,12 +16,12 @@ DEFINE_string(model_dir, "", "Directory of the inference model. " "It constains deploy.yaml and infer models"); DEFINE_string(img_path, "", "Path of the test image."); -DEFINE_string(devices, "GPU", "Use GPU or CPU devices. Default: GPU"); +DECLARE_string(devices); // 'devices' was already defined in paddle/fluid/inference/io.cc: "(devices, "", "The devices to be used which is joined by comma.");" DEFINE_bool(use_trt, false, "Wether enable TensorRT when use GPU. Defualt: false."); DEFINE_string(trt_precision, "fp32", "The precision of TensorRT, support fp32, fp16 and int8. Default: fp32"); DEFINE_bool(use_trt_dynamic_shape, false, "Wether enable dynamic shape when use GPU and TensorRT. Defualt: false."); DEFINE_string(dynamic_shape_path, "", "If set dynamic_shape_path, it read the dynamic shape for TRT."); -DEFINE_bool(use_mkldnn, false, "Wether enable MKLDNN when use CPU. Defualt: false."); +DECLARE_bool(use_mkldnn); // 'use_mkldnn' was already defined in paddle/phi/core/flags.cc: "(use_mkldnn, false, "Use MKLDNN to run");" DEFINE_string(save_dir, "", "Directory of the output image."); typedef struct YamlConfig {