diff --git a/model_examples/MapTR/README.md b/model_examples/MapTR/README.md index d9fa343e14f6f7d08b3d231cc846deda1ab04134..505f654bb71dc40836e05dedb3adaec518d9d52e 100644 --- a/model_examples/MapTR/README.md +++ b/model_examples/MapTR/README.md @@ -412,6 +412,8 @@ wget https://download.pytorch.org/models/resnet50-19c8e357.pth # 变更说明 +2025.08.13:优化模型性能计算脚本。 + 2025.05.22:更新Ubuntu系统安装tcmalloc高性能内存库的方式。 2025.04.17:优化模型性能打屏格式,修改Torch2.1.0适配的依赖包版本。 diff --git a/model_examples/MapTR/test/nnodes_train_8p_performance.sh b/model_examples/MapTR/test/nnodes_train_8p_performance.sh index 133cb3a17c225c1bd9efe43f79b7c535a33b47b0..c1bc749b6110ee380ea0668953a77a076c17063b 100644 --- a/model_examples/MapTR/test/nnodes_train_8p_performance.sh +++ b/model_examples/MapTR/test/nnodes_train_8p_performance.sh @@ -57,9 +57,9 @@ CaseName=${Network}_bs${BatchSize}_${WORLD_SIZE}'p'_'acc' # 结果打印,不需要修改 echo "------------------ Final result ------------------" # 输出性能FPS,需要模型审视修改 -epoch_start_time=`grep "mmcv - INFO - Reducer buckets have been rebuilt in this iteration*" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | grep -o [0-9][0-9]:[0-9][0-9]:[0-9][0-9]` -epoch_end_time=`grep "Saving checkpoint at 1 epochs*" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | grep -o [0-9][0-9]:[0-9][0-9]:[0-9][0-9]` -epoch_duration=$(($(date +%s -d $epoch_end_time) - $(date +%s -d $epoch_start_time))) +epoch_start_time=$(grep "mmcv - INFO - Reducer buckets have been rebuilt in this iteration" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | awk -F" " '{print $1" "$2}' | cut -d, -f1) +epoch_end_time=$(grep "Saving checkpoint at 1 epochs" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | awk -F" " '{print $1" "$2}' | cut -d, -f1) +epoch_duration=$(($(date +%s -d "$epoch_end_time") - $(date +%s -d "$epoch_start_time"))) iteration_steps=`grep "mmdet - INFO - Epoch" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | grep -Po '\[\K[^]]*' | awk -F/ '{printf $2}'` fps_value=$(awk -v i="$iteration_steps" -v bs="$BatchSize" -v ws="$WORLD_SIZE" -v dur="$epoch_duration" 'BEGIN { printf "%.4f", i*bs*ws/dur }') diff --git a/model_examples/MapTR/test/train_8p_performance.sh b/model_examples/MapTR/test/train_8p_performance.sh index e0b6d6cd13cced2228380ce036ecc12d1dea7fcf..0b943eac64039a1a2117c5f0b8b57e0daed27372 100644 --- a/model_examples/MapTR/test/train_8p_performance.sh +++ b/model_examples/MapTR/test/train_8p_performance.sh @@ -57,9 +57,9 @@ CaseName=${Network}_bs${BatchSize}_${WORLD_SIZE}'p'_'acc' # 结果打印,不需要修改 echo "------------------ Final result ------------------" # 输出性能FPS,需要模型审视修改 -epoch_start_time=`grep "mmcv - INFO - Reducer buckets have been rebuilt in this iteration*" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | grep -o [0-9][0-9]:[0-9][0-9]:[0-9][0-9]` -epoch_end_time=`grep "Saving checkpoint at 1 epochs*" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | grep -o [0-9][0-9]:[0-9][0-9]:[0-9][0-9]` -epoch_duration=$(($(date +%s -d $epoch_end_time) - $(date +%s -d $epoch_start_time))) +epoch_start_time=$(grep "mmcv - INFO - Reducer buckets have been rebuilt in this iteration" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | awk -F" " '{print $1" "$2}' | cut -d, -f1) +epoch_end_time=$(grep "Saving checkpoint at 1 epochs" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | awk -F" " '{print $1" "$2}' | cut -d, -f1) +epoch_duration=$(($(date +%s -d "$epoch_end_time") - $(date +%s -d "$epoch_start_time"))) iteration_steps=`grep "mmdet - INFO - Epoch" ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tail -1 | grep -Po '\[\K[^]]*' | awk -F/ '{printf $2}'` fps_value=$(awk -v i="$iteration_steps" -v bs="$BatchSize" -v ws="$WORLD_SIZE" -v dur="$epoch_duration" 'BEGIN { printf "%.4f", i*bs*ws/dur }')