From e92ae027bb1810a854216b73596b24af92a2155f Mon Sep 17 00:00:00 2001 From: zhengya01 Date: Fri, 23 Sep 2022 17:19:52 +0800 Subject: [PATCH 1/2] fix tipc ptq log --- test_tipc/test_ptq_inference_python.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test_tipc/test_ptq_inference_python.sh b/test_tipc/test_ptq_inference_python.sh index e6801f640b..020bc2a393 100644 --- a/test_tipc/test_ptq_inference_python.sh +++ b/test_tipc/test_ptq_inference_python.sh @@ -124,7 +124,7 @@ function func_inference() { eval $command last_status=${PIPESTATUS[0]} eval "cat ${_save_log_path}" - status_check $last_status "${command}" "${status_log}" "${model_name}" + status_check $last_status "${command}" "${status_log}" "${model_name}" "${_save_log_path}" done done done @@ -146,7 +146,7 @@ function func_inference() { eval $command last_status=${PIPESTATUS[0]} eval "cat ${_save_log_path}" - status_check $last_status "${command}" "${status_log}" "${model_name}" + status_check $last_status "${command}" "${status_log}" "${model_name}" "${_save_log_path}" done done done @@ -158,12 +158,13 @@ function func_inference() { # for kl_quant if [ ${kl_quant_cmd_value} != "null" ] && [ ${kl_quant_cmd_value} != "False" ]; then + _kl_log="${LOG_PATH}/export.log" echo "kl_quant" - command="${python} ${kl_quant_cmd_value}" + command="${python} ${kl_quant_cmd_value} >${_kl_log} 2>&1" echo ${command} eval $command last_status=${PIPESTATUS[0]} - status_check $last_status "${command}" "${status_log}" "${model_name}" + status_check $last_status "${command}" "${status_log}" "${model_name}" "${_kl_log}" cd ${infer_model_dir_list}/quant_post_static_model ln -s __model__ inference.pdmodel ln -s __params__ inference.pdiparams From 27cedc89fff86dd05265c1f00bf9c0b115e46048 Mon Sep 17 00:00:00 2001 From: zhengya01 Date: Fri, 23 Sep 2022 18:22:00 +0800 Subject: [PATCH 2/2] fix tipc log --- test_tipc/test_inference_cpp.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test_tipc/test_inference_cpp.sh b/test_tipc/test_inference_cpp.sh index c56bc69602..27f5ae64ef 100644 --- a/test_tipc/test_inference_cpp.sh +++ b/test_tipc/test_inference_cpp.sh @@ -37,6 +37,7 @@ cpp_benchmark_value=$(func_parser_value "${lines[16]}") generate_yaml_cmd=$(func_parser_value "${lines[17]}") transform_index_cmd=$(func_parser_value "${lines[18]}") +# set LOG_PATH CLS_ROOT_PATH=$(pwd) LOG_PATH="${CLS_ROOT_PATH}/test_tipc/output/${model_name}/${MODE}" mkdir -p ${LOG_PATH}