From b6fd718a3a065a963e9dc179e9652a651cae6d80 Mon Sep 17 00:00:00 2001 From: kaileiyx Date: Wed, 15 Oct 2025 13:57:42 +0800 Subject: [PATCH] enable pt2e fp16 acc test --- .github/actions/pt2e/action.yml | 7 +++++++ .github/workflows/_linux_e2e.yml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/actions/pt2e/action.yml b/.github/actions/pt2e/action.yml index 60954ffd29..8a52b27b98 100644 --- a/.github/actions/pt2e/action.yml +++ b/.github/actions/pt2e/action.yml @@ -64,6 +64,13 @@ runs: {acc1 = $(NF - 2); acc5 = $NF;} END{printf("Accuracy,%s,int8,%s,%s\n", m, acc1, acc5) }' |tee -a ${pt2e_logs_dir}/summary.csv fi + if [[ "${{ inputs.dt }}" == *"float16"* ]];then + ${cmd_line} --model_list ${model_name} --dtype float16 2>&1 |tee "${pt2e_logs_dir}/accuracy-float16-${model_name}.log" || true + (grep -i 'Acc.1.*Acc.5' "${pt2e_logs_dir}/accuracy-float16-${model_name}.log" || echo "failed & failed") 2>&1 |tail -n 1 |awk -v m="${model_name}" ' + BEGIN{acc1 = "failed"; acc5 = "failed";} + {acc1 = $(NF - 2); acc5 = $NF;} + END{printf("Accuracy,%s,float16,%s,%s\n", m, acc1, acc5) }' |tee -a ${pt2e_logs_dir}/summary.csv + fi done fi if [[ "${{ inputs.scenario }}" == *"performance"* ]];then diff --git a/.github/workflows/_linux_e2e.yml b/.github/workflows/_linux_e2e.yml index bb1f66c61b..4d6ffab67b 100644 --- a/.github/workflows/_linux_e2e.yml +++ b/.github/workflows/_linux_e2e.yml @@ -153,7 +153,7 @@ jobs: if: ${{ contains(inputs.test_type, 'nightly') && contains(inputs.suite, 'pt2e') }} uses: ./.github/actions/pt2e with: - dt: float32,int8 + dt: float32,int8,float16 scenario: accuracy,performance # Weekly launch @@ -185,7 +185,7 @@ jobs: if: ${{ contains(inputs.test_type, 'weekly') && contains(inputs.suite, 'pt2e') }} uses: ./.github/actions/pt2e with: - dt: float32,int8 + dt: float32,int8,float16 scenario: accuracy,performance # On-demand launch