From 1e5ff97f0617bc8351b64f54b3c06c28645ab4ac Mon Sep 17 00:00:00 2001 From: yongchao1 <297389370@qq.com> Date: Thu, 25 Jul 2024 11:53:00 +0000 Subject: [PATCH 1/5] =?UTF-8?q?update=20ResNet50=5FID0360=5Ffor=5FTensorFl?= =?UTF-8?q?ow2.X/test/train=5Fperformance=5F1p=5Fprofiling1.sh.=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20ResNet50=5FID0360=5Ffor=5FTensorFlow2.X=20?= =?UTF-8?q?profiling=E7=BB=B4=E6=B5=8B=E5=88=A4=E5=AE=9A=E6=A0=87=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yongchao1 <297389370@qq.com> --- .../test/train_performance_1p_profiling1.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling1.sh b/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling1.sh index 4bb5790fd..095b0e3fc 100644 --- a/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling1.sh +++ b/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling1.sh @@ -179,6 +179,15 @@ ActualFPS=${FPS} #单迭代训练时长 TrainingTime=`awk 'BEGIN{printf "%.2f\n",'${BatchSize}'*1000/'${FPS}'}'` +op_static=`find ${cur_path}/etp_output/profiling/PROF*/mindstudio_profiler_output/ -name op_statistic*.csv | wc -l` +echo $op_static +if [ $op_static -eq 1 ]; then + echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +else + echo "ActualFPS = " >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +fi + + #从train_$ASCEND_DEVICE_ID.log提取Loss到train_${CaseName}_loss.txt中,需要根据模型审视 grep train_loss $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log|grep -v BatchTimestamp|awk '{print $10}'|sed 's/,//g'|sed '/^$/d' >> $cur_path/output/$ASCEND_DEVICE_ID/train_${CaseName}_loss.txt -- Gitee From 72a8347b3cdb81155f71705b6ed611131582bef3 Mon Sep 17 00:00:00 2001 From: yongchao1 <297389370@qq.com> Date: Thu, 25 Jul 2024 11:54:41 +0000 Subject: [PATCH 2/5] =?UTF-8?q?update=20ResNet50=5FID0360=5Ffor=5FTensorFl?= =?UTF-8?q?ow2.X/test/train=5Fperformance=5F1p=5Fprofiling1.sh.=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=A4=E5=AE=9A=E6=A0=87=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yongchao1 <297389370@qq.com> --- .../test/train_performance_1p_profiling1.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling1.sh b/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling1.sh index 095b0e3fc..6c1b65fd7 100644 --- a/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling1.sh +++ b/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling1.sh @@ -200,7 +200,7 @@ echo "RankSize = ${RANK_SIZE}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName} echo "BatchSize = ${BatchSize}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "DeviceType = ${DeviceType}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "CaseName = ${CaseName}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +#echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainingTime = ${TrainingTime}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainAccuracy = ${train_accuracy}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "ActualLoss = ${ActualLoss}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -- Gitee From 3cd90def254e30549d4ec4c67851f094a8a42d25 Mon Sep 17 00:00:00 2001 From: yongchao1 <297389370@qq.com> Date: Thu, 25 Jul 2024 12:02:51 +0000 Subject: [PATCH 3/5] =?UTF-8?q?update=20ResNet50=5FID0360=5Ffor=5FTensorFl?= =?UTF-8?q?ow2.X/test/train=5Fperformance=5F1p=5Fprofiling2.sh.=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9Eprofiling=E7=BB=B4=E6=B5=8B=E5=88=A4=E5=AE=9A?= =?UTF-8?q?=E6=A0=87=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yongchao1 <297389370@qq.com> --- .../test/train_performance_1p_profiling2.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling2.sh b/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling2.sh index 31313feeb..dd07ca5fa 100644 --- a/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling2.sh +++ b/TensorFlow2/built-in/cv/image_classification/ResNet50_ID0360_for_TensorFlow2.X/test/train_performance_1p_profiling2.sh @@ -184,6 +184,14 @@ ActualFPS=${FPS} #单迭代训练时长 TrainingTime=`awk 'BEGIN{printf "%.2f\n",'${BatchSize}'*1000/'${FPS}'}'` +op_static=`find $cur_path/../tensorflow/profiling/PROF*/mindstudio_profiler_output/ -name op_statistic*.csv | wc -l` +echo $op_static +if [ $op_static -eq 1 ]; then + echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +else + echo "ActualFPS = " >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +fi + #从train_$ASCEND_DEVICE_ID.log提取Loss到train_${CaseName}_loss.txt中,需要根据模型审视 grep train_loss $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID.log|grep -v BatchTimestamp|awk '{print $10}'|sed 's/,//g'|sed '/^$/d' >> $cur_path/output/$ASCEND_DEVICE_ID/train_${CaseName}_loss.txt @@ -196,7 +204,7 @@ echo "RankSize = ${RANK_SIZE}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName} echo "BatchSize = ${BatchSize}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "DeviceType = ${DeviceType}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "CaseName = ${CaseName}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +#echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainingTime = ${TrainingTime}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainAccuracy = ${train_accuracy}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "ActualLoss = ${ActualLoss}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -- Gitee From 26fccea8747d1e828b3235689ef6d6bbae93735d Mon Sep 17 00:00:00 2001 From: yongchao1 <297389370@qq.com> Date: Thu, 25 Jul 2024 12:37:33 +0000 Subject: [PATCH 4/5] =?UTF-8?q?update=20WideDeep=5FID2712=5Ffor=5FTensorFl?= =?UTF-8?q?ow/test/train=5Fperformance=5F1p=5Fprofiling1.sh.=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9Eprofiling=E7=BB=B4=E6=B5=8B=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yongchao1 <297389370@qq.com> --- .../test/train_performance_1p_profiling1.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/TensorFlow/built-in/recommendation/WideDeep_ID2712_for_TensorFlow/test/train_performance_1p_profiling1.sh b/TensorFlow/built-in/recommendation/WideDeep_ID2712_for_TensorFlow/test/train_performance_1p_profiling1.sh index 24bd4704e..27dacebd6 100644 --- a/TensorFlow/built-in/recommendation/WideDeep_ID2712_for_TensorFlow/test/train_performance_1p_profiling1.sh +++ b/TensorFlow/built-in/recommendation/WideDeep_ID2712_for_TensorFlow/test/train_performance_1p_profiling1.sh @@ -142,6 +142,13 @@ ActualFPS=${FPS} TrainingTime=$time echo "TrainingTime(ms/step) : $TrainingTime" +op_static=`find ${cur_path}/etp_output/profiling/PROF*/mindstudio_profiler_output/ -name op_statistic*.csv | wc -l` +echo $op_static +if [ $op_static -eq 1 ]; then + echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +else + echo "ActualFPS = " >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +fi #从train_$ASCEND_DEVICE_ID.log提取Loss到train_${CaseName}_loss.txt中,需要根据模型审视 loss=`grep 'loss =' $cur_path/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tr -d '\b\r' | awk -F' ' '{print $9}'|sed 's/,$//'` echo "${loss}"> $cur_path/output/$ASCEND_DEVICE_ID/train_${CaseName}_loss.txt @@ -155,7 +162,7 @@ echo "RankSize = ${RANK_SIZE}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName} echo "BatchSize = ${BatchSize}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "DeviceType = ${DeviceType}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "CaseName = ${CaseName}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +#echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainingTime = ${TrainingTime}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainAccuracy = ${train_accuracy}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "ActualLoss = ${ActualLoss}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -- Gitee From 3e639d4dfc4f1ac140694eb7bd5df867caadef27 Mon Sep 17 00:00:00 2001 From: yongchao1 <297389370@qq.com> Date: Thu, 25 Jul 2024 12:45:27 +0000 Subject: [PATCH 5/5] =?UTF-8?q?update=20WideDeep=5FID2712=5Ffor=5FTensorFl?= =?UTF-8?q?ow/test/train=5Fperformance=5F1p=5Fprofiling2.sh.=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9Eprofiling=E7=BB=B4=E6=B5=8B=E5=88=A4=E5=AE=9A=E6=A0=87?= =?UTF-8?q?=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yongchao1 <297389370@qq.com> --- .../test/train_performance_1p_profiling2.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/TensorFlow/built-in/recommendation/WideDeep_ID2712_for_TensorFlow/test/train_performance_1p_profiling2.sh b/TensorFlow/built-in/recommendation/WideDeep_ID2712_for_TensorFlow/test/train_performance_1p_profiling2.sh index 4beaccc1c..6e91f09ec 100644 --- a/TensorFlow/built-in/recommendation/WideDeep_ID2712_for_TensorFlow/test/train_performance_1p_profiling2.sh +++ b/TensorFlow/built-in/recommendation/WideDeep_ID2712_for_TensorFlow/test/train_performance_1p_profiling2.sh @@ -148,6 +148,13 @@ ActualFPS=${FPS} TrainingTime=$time echo "TrainingTime(ms/step) : $TrainingTime" +op_static=`find ${cur_path}/../profiling/PROF*/mindstudio_profiler_output/ -name op_statistic*.csv | wc -l` +echo $op_static +if [ $op_static -eq 1 ]; then + echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +else + echo "ActualFPS = " >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +fi #从train_$ASCEND_DEVICE_ID.log提取Loss到train_${CaseName}_loss.txt中,需要根据模型审视 loss=`grep 'loss =' $cur_path/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log | tr -d '\b\r' | awk -F' ' '{print $9}'|sed 's/,$//'` echo "${loss}"> $cur_path/output/$ASCEND_DEVICE_ID/train_${CaseName}_loss.txt @@ -161,7 +168,7 @@ echo "RankSize = ${RANK_SIZE}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName} echo "BatchSize = ${BatchSize}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "DeviceType = ${DeviceType}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "CaseName = ${CaseName}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +#echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainingTime = ${TrainingTime}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainAccuracy = ${train_accuracy}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "ActualLoss = ${ActualLoss}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -- Gitee