From 0b631cfe9acbec05169c2fc0288aba1a208d6f99 Mon Sep 17 00:00:00 2001 From: wuweikang Date: Wed, 11 Nov 2020 10:48:15 +0800 Subject: [PATCH] add help info for debug_dir & op_compiler_cache_dir/mode --- ge/offline/main.cc | 6 +++++- inc/external/ge/ge_api_types.h | 23 +++++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/ge/offline/main.cc b/ge/offline/main.cc index b15428f2..c0aa583c 100755 --- a/ge/offline/main.cc +++ b/ge/offline/main.cc @@ -300,7 +300,11 @@ class GFlagUtils { " --save_original_model Control whether to output original model. E.g.: true: output original model\n" " --log Generate log with level. Support debug, info, warning, error, null\n" " --dump_mode The switch of dump json with shape, to be used with mode 1. " - "0(default): disable; 1: enable."); + "0(default): disable; 1: enable.\n" + " --debug_dir Set the save path of operator compilation intermediate files. Default value: ./\n" + " --op_compiler_cache_dir Set the save path of operator compilation cache files. Default value: ./\n" + " --op_compiler_cache_mode Set the operator compilation cache mode." + "Options are disable(default), enable and force(force to refresh the cache)"); gflags::ParseCommandLineNonHelpFlags(&argc, &argv, true); // Using gflags to analyze input parameters diff --git a/inc/external/ge/ge_api_types.h b/inc/external/ge/ge_api_types.h index 9c51bac0..4cee1b6f 100644 --- a/inc/external/ge/ge_api_types.h +++ b/inc/external/ge/ge_api_types.h @@ -316,12 +316,23 @@ static const char *const DEBUG_DIR = ge::DEBUG_DIR; static const char *const OP_COMPILER_CACHE_DIR = ge::OP_COMPILER_CACHE_DIR; static const char *const OP_COMPILER_CACHE_MODE = ge::OP_COMPILER_CACHE_MODE; // for interface: aclgrphBuildModel -const std::set ir_builder_suppported_options = { - INPUT_FORMAT, INPUT_SHAPE, OP_NAME_MAP, - DYNAMIC_BATCH_SIZE, DYNAMIC_IMAGE_SIZE, DYNAMIC_DIMS, - INSERT_OP_FILE, PRECISION_MODE, EXEC_DISABLE_REUSED_MEMORY, - AUTO_TUNE_MODE, OUTPUT_TYPE, OUT_NODES, - INPUT_FP16_NODES, LOG_LEVEL}; +const std::set ir_builder_suppported_options = {INPUT_FORMAT, + INPUT_SHAPE, + OP_NAME_MAP, + DYNAMIC_BATCH_SIZE, + DYNAMIC_IMAGE_SIZE, + DYNAMIC_DIMS, + INSERT_OP_FILE, + PRECISION_MODE, + EXEC_DISABLE_REUSED_MEMORY, + AUTO_TUNE_MODE, + OUTPUT_TYPE, + OUT_NODES, + INPUT_FP16_NODES, + LOG_LEVEL, + DEBUG_DIR, + OP_COMPILER_CACHE_DIR, + OP_COMPILER_CACHE_MODE}; // for interface: aclgrphParse const std::set ir_parser_suppported_options = {INPUT_FORMAT,