Skip to content

Commit d194d5c

Browse files
authored
[Nightly] Enhance PT2E test and fix trigger issue (#1846)
1. fix accelerate and transformers issues #1816 2. enhance PT2E test disable_all
1 parent 5b5c3fc commit d194d5c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.github/actions/pt2e/action.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ runs:
9999
set -xe
100100
pt2e_logs_dir="${{ github.workspace }}/../pytorch/inductor_log/pt2e"
101101
rm -rf "${pt2e_logs_dir}" && mkdir -p "${pt2e_logs_dir}"
102-
echo "Mode,Model,Dtype,Result" > ${pt2e_logs_dir}/summary.csv
102+
echo "Mode,Model,Dtype,Result" |tee ${pt2e_logs_dir}/summary.csv
103103
if [[ "${{ inputs.scenario }}" == *"accuracy"* ]];then
104104
models="alexnet,mnasnet1_0,mobilenet_v2,mobilenet_v3_large,resnet152,resnet18,resnet50,resnext50_32x4d,shufflenet_v2_x1_0,squeezenet1_1,vgg16"
105105
cmd_line=" python pt2e-accuracy/scripts/modelbench/quant/inductor_quant_acc.py --device xpu --dataset_dir ${HOME}/datasets/imagenet "
@@ -110,14 +110,14 @@ runs:
110110
grep -i 'Acc.1.*Acc.5' "${pt2e_logs_dir}/accuracy-float32-${model_name}.log" |tail -n 1 |awk -v m="${model_name}" '
111111
BEGIN{acc1 = "failed"; acc5 = "failed";}
112112
{acc1 = $(NF - 2); acc5 = $NF;}
113-
END{printf("Accuracy,%s,float32,%s,%s\n", m, acc1, acc5) }' >> ${pt2e_logs_dir}/summary.csv
113+
END{printf("Accuracy,%s,float32,%s,%s\n", m, acc1, acc5) }' |tee -a ${pt2e_logs_dir}/summary.csv
114114
fi
115115
if [[ "${{ inputs.dt }}" == *"int8"* ]];then
116116
${cmd_line} --model_list ${model_name} 2>&1 |tee "${pt2e_logs_dir}/accuracy-int8-${model_name}.log" || true
117117
grep -i 'Acc.1.*Acc.5' "${pt2e_logs_dir}/accuracy-int8-${model_name}.log" |tail -n 1 |awk -v m="${model_name}" '
118118
BEGIN{acc1 = "failed"; acc5 = "failed";}
119119
{acc1 = $(NF - 2); acc5 = $NF;}
120-
END{printf("Accuracy,%s,int8,%s,%s\n", m, acc1, acc5) }' >> ${pt2e_logs_dir}/summary.csv
120+
END{printf("Accuracy,%s,int8,%s,%s\n", m, acc1, acc5) }' |tee -a ${pt2e_logs_dir}/summary.csv
121121
fi
122122
done
123123
fi
@@ -132,24 +132,24 @@ runs:
132132
if [[ "${{ inputs.dt }}" == *"float32"* ]];then
133133
rm -rf pt2e-performance/.userbenchmark
134134
${cmd_line} -m ${model_name} 2>&1 |tee "${pt2e_logs_dir}/performance-float32.log" || true
135-
grep -ir 'eval_throughput' pt2e-performance/.userbenchmark |tail -n 1 |awk -v m="${model_name}" '
135+
(grep -ir 'eval_throughput' pt2e-performance/.userbenchmark || echo "failed") 2>&1 |tail -n 1 |awk -v m="${model_name}" '
136136
BEGIN{fps = "failed";}
137137
{fps = $NF;}
138-
END{printf("Performance,%s,float32,%s\n", m, fps) }' >> ${pt2e_logs_dir}/summary.csv
138+
END{printf("Performance,%s,float32,%s\n", m, fps) }' |tee -a ${pt2e_logs_dir}/summary.csv
139139
fi
140140
if [[ "${{ inputs.dt }}" == *"int8"* ]];then
141141
rm -rf pt2e-performance/.userbenchmark
142142
XPU_QUANT_CONFIG=ASYMM ${cmd_line} -m ${model_name} --quantization pt2e 2>&1 |tee "${pt2e_logs_dir}/performance-ASYMM.log" || true
143-
grep -ir 'eval_throughput' pt2e-performance/.userbenchmark |tail -n 1 |awk -v m="${model_name}" '
143+
(grep -ir 'eval_throughput' pt2e-performance/.userbenchmark || echo "failed") 2>&1 |tail -n 1 |awk -v m="${model_name}" '
144144
BEGIN{fps = "failed";}
145145
{fps = $NF;}
146-
END{printf("Performance,%s,ASYMM,%s\n", m, fps) }' >> ${pt2e_logs_dir}/summary.csv
146+
END{printf("Performance,%s,ASYMM,%s\n", m, fps) }' |tee -a ${pt2e_logs_dir}/summary.csv
147147
rm -rf pt2e-performance/.userbenchmark
148148
XPU_QUANT_CONFIG=SYMM ${cmd_line} -m ${model_name} --quantization pt2e 2>&1 |tee "${pt2e_logs_dir}/performance-SYMM.log" || true
149-
grep -ir 'eval_throughput' pt2e-performance/.userbenchmark |tail -n 1 |awk -v m="${model_name}" '
149+
(grep -ir 'eval_throughput' pt2e-performance/.userbenchmark || echo "failed") 2>&1 |tail -n 1 |awk -v m="${model_name}" '
150150
BEGIN{fps = "failed";}
151151
{fps = $NF;}
152-
END{printf("Performance,%s,SYMM,%s\n", m, fps) }' >> ${pt2e_logs_dir}/summary.csv
152+
END{printf("Performance,%s,SYMM,%s\n", m, fps) }' |tee -a ${pt2e_logs_dir}/summary.csv
153153
fi
154154
done
155155
fi

.github/workflows/_linux_accelerate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
run: |
6262
set -x -e -o pipefail
6363
sudo apt update && sudo apt install -y dos2unix
64-
gh --repo ${GITHUB_REPOSITORY} pr view ${{ github.event.pull_request.number }} 2>&1 |tee pr-info.txt
64+
(gh --repo ${GITHUB_REPOSITORY} pr view ${{ github.event.pull_request.number }} || echo $?) 2>&1 |tee pr-info.txt
6565
dos2unix pr-info.txt
6666
disabled_tests="$(awk '/disable_/{printf("%s ", $0)}' pr-info.txt)"
6767
echo "disabled_tests=${disabled_tests}" |tee "${GITHUB_OUTPUT}"

.github/workflows/_linux_transformers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
run: |
9090
set -x -e -o pipefail
9191
sudo apt update && sudo apt install -y dos2unix
92-
gh --repo ${GITHUB_REPOSITORY} pr view ${{ github.event.pull_request.number }} 2>&1 |tee pr-info.txt
92+
(gh --repo ${GITHUB_REPOSITORY} pr view ${{ github.event.pull_request.number }} || echo $?) 2>&1 |tee pr-info.txt
9393
dos2unix pr-info.txt
9494
disabled_tests="$(awk '/disable_/{printf("%s ", $0)}' pr-info.txt)"
9595
echo "disabled_tests=${disabled_tests}" |tee "${GITHUB_OUTPUT}"

0 commit comments

Comments
 (0)