Skip to content

Commit facc73b

Browse files
Update ViT BKC script (#3917)
Co-authored-by: Xuan Liao <xuan.liao@intel.com>
1 parent a4db4d4 commit facc73b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/cpu/inference/python/models/vit/run_model.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ throughput="N/A"
170170
accuracy="N/A"
171171

172172
if [[ "${TEST_MODE}" == "THROUGHPUT" ]]; then
173-
throughput=$(grep 'Throughput:' ${OUTPUT_DIR}/throughput_log* |sed -e 's/.*Throughput//;s/[^0-9.]//g' |awk '
173+
throughput=$(grep -a 'Throughput:' ${OUTPUT_DIR}/throughput_log* |sed -e 's/.*Throughput//;s/[^0-9.]//g' |awk '
174174
BEGIN {
175175
sum = 0;
176176
i = 0;
@@ -186,11 +186,11 @@ if [[ "${TEST_MODE}" == "THROUGHPUT" ]]; then
186186
echo "--------------------------------Performance Summary per NUMA Node--------------------------------"
187187
echo ""vit-base";"throughput";${precision};${BATCH_SIZE};${throughput}" | tee -a ${WORK_SPACE}/summary.log
188188
elif [[ "${TEST_MODE}" == "ACCURACY" ]]; then
189-
accuracy=$(cat ${OUTPUT_DIR}/accuracy_log* | grep "eval_accuracy" |sed -e 's/.*= //;s/[^0-9.]//g')
190-
f1=$(cat ${OUTPUT_DIR}/accuracy_log* | grep "eval_f1" |sed -e 's/.*= //;s/[^0-9.]//g')
189+
accuracy=$(cat ${OUTPUT_DIR}/accuracy_log* | grep -a "eval_accuracy" |sed -e 's/.*= //;s/[^0-9.]//g')
190+
f1=$(cat ${OUTPUT_DIR}/accuracy_log* | grep -a "eval_f1" |sed -e 's/.*= //;s/[^0-9.]//g')
191191
echo ""vit-base";"accuracy";${precision};${BATCH_SIZE};${accuracy}" | tee -a ${WORK_SPACE}/summary.log
192192
elif [[ "${TEST_MODE}" == "REALTIME" ]]; then
193-
throughput=$(grep 'Throughput:' ${OUTPUT_DIR}/latency_log* |sed -e 's/.*Throughput://;s/[^0-9.]//g' |awk -v INSTANCES_PER_SOCKET=$INSTANCES_PER_SOCKET '
193+
throughput=$(grep -a 'Throughput:' ${OUTPUT_DIR}/latency_log* |sed -e 's/.*Throughput://;s/[^0-9.]//g' |awk -v INSTANCES_PER_SOCKET=$INSTANCES_PER_SOCKET '
194194
BEGIN {
195195
sum = 0;
196196
i = 0;
@@ -203,7 +203,7 @@ elif [[ "${TEST_MODE}" == "REALTIME" ]]; then
203203
sum = sum / i * INSTANCES_PER_SOCKET;
204204
printf("%.2f", sum);
205205
}')
206-
p99_latency=$(grep 'P99 Latency' ${OUTPUT_DIR}/latency_log* |sed -e 's/.*P99 Latency//;s/[^0-9.]//g' |awk -v INSTANCES_PER_SOCKET=$INSTANCES_PER_SOCKET '
206+
p99_latency=$(grep -a 'P99 Latency' ${OUTPUT_DIR}/latency_log* |sed -e 's/.*P99 Latency//;s/[^0-9.]//g' |awk -v INSTANCES_PER_SOCKET=$INSTANCES_PER_SOCKET '
207207
BEGIN {
208208
sum = 0;
209209
i = 0;

0 commit comments

Comments
 (0)