[AMD][CI] Add GLM-5-MXFP4 accuracy and perf nightly tests for MI35x (#21773)
This commit is contained in:
@@ -43,7 +43,6 @@ on:
|
||||
- nightly-8-gpu-kimi-k25-rocm720
|
||||
- nightly-8-gpu-qwen3-235b-rocm720
|
||||
- nightly-8-gpu-qwen35-rocm720
|
||||
- nightly-8-gpu-glm5-rocm720
|
||||
- nightly-8-gpu-glm51-rocm720
|
||||
- nightly-8-gpu-minimax-m27-rocm720
|
||||
- nightly-1-gpu-zimage-turbo-rocm720
|
||||
@@ -61,8 +60,8 @@ on:
|
||||
- nightly-8-gpu-mi35x-kimi-k25-rocm720
|
||||
- nightly-8-gpu-mi35x-qwen3-235b-mxfp4-rocm720
|
||||
- nightly-8-gpu-mi35x-qwen35-rocm720
|
||||
- nightly-8-gpu-mi35x-glm5-rocm720
|
||||
- nightly-8-gpu-mi35x-glm51-rocm720
|
||||
- nightly-8-gpu-mi35x-glm5-mxfp4-rocm720
|
||||
job_filter:
|
||||
description: 'Or type comma-separated job names (overrides dropdown if non-empty)'
|
||||
required: false
|
||||
@@ -665,50 +664,6 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# 8-GPU GLM-5 (Accuracy + Performance combined) ROCm 7.2
|
||||
nightly-8-gpu-glm5-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-glm5-rocm720,'))
|
||||
runs-on: linux-mi325-8gpu-sglang
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker (ROCm 7.2)
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh --rocm-version rocm720
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh --skip-test-time-deps
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git@96f807a33b75
|
||||
|
||||
- name: Accuracy Test ROCm 7.2 (8-GPU GLM-5 NSA)
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-accuracy-8-gpu-glm5 --nightly --timeout-per-file 3600 ${{ inputs.continue_on_error && '--continue-on-error' || '' }} || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
- name: Performance Test ROCm 7.2 (8-GPU GLM-5)
|
||||
timeout-minutes: 120
|
||||
continue-on-error: true # Perf test failure doesn't fail the job if accuracy passed
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e SGLANG_USE_AITER=1 \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-perf-8-gpu-glm5 --nightly --timeout-per-file 5400 ${{ inputs.continue_on_error && '--continue-on-error' || '' }} || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# 8-GPU GLM-5.1 (Accuracy + Performance combined) ROCm 7.2
|
||||
nightly-8-gpu-glm51-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-glm51-rocm720,'))
|
||||
@@ -1332,40 +1287,6 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU GLM-5 (Accuracy only) ROCm 7.2
|
||||
nightly-8-gpu-mi35x-glm5-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-mi35x-glm5-rocm720,'))
|
||||
runs-on: linux-mi35x-gpu-8
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker (ROCm 7.2)
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh --rocm-version rocm720
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh --skip-test-time-deps
|
||||
# Install tabulate for run_suite.py (missing in MI35x container)
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install tabulate
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git@96f807a33b75
|
||||
|
||||
- name: Accuracy Test MI35x ROCm 7.2 (8-GPU GLM-5 NSA)
|
||||
timeout-minutes: 180
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-8-gpu-mi35x-glm5 --nightly --timeout-per-file 7200 ${{ inputs.continue_on_error && '--continue-on-error' || '' }} || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU GLM-5.1 (Accuracy + Performance combined) ROCm 7.2
|
||||
nightly-8-gpu-mi35x-glm51-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-mi35x-glm51-rocm720,'))
|
||||
@@ -1410,6 +1331,52 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU GLM-5-MXFP4 (Accuracy + Performance combined) ROCm 7.2
|
||||
nightly-8-gpu-mi35x-glm5-mxfp4-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-mi35x-glm5-mxfp4-rocm720,'))
|
||||
runs-on: linux-mi35x-gpu-8
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker (ROCm 7.2)
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh --rocm-version rocm720
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh --skip-test-time-deps
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install tabulate
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git@96f807a33b75
|
||||
|
||||
- name: Accuracy Test MI35x ROCm 7.2 (8-GPU GLM-5-MXFP4)
|
||||
timeout-minutes: 180
|
||||
run: |
|
||||
> github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e SGLANG_USE_AITER=1 \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-8-gpu-mi35x-glm5-mxfp4 --nightly --timeout-per-file 7200 ${{ inputs.continue_on_error && '--continue-on-error' || '' }} || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
- name: Performance Test MI35x ROCm 7.2 (8-GPU GLM-5-MXFP4)
|
||||
timeout-minutes: 300
|
||||
continue-on-error: true
|
||||
run: |
|
||||
> github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e SGLANG_USE_AITER=1 \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 registered/amd/perf/mi35x/test_glm5_mxfp4_perf_mi35x.py || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU DeepSeek-V3.2 Performance Test (MTP) ROCm 7.2
|
||||
nightly-perf-8-gpu-mi35x-deepseek-v32-mtp-rocm720:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-perf-8-gpu-mi35x-deepseek-v32-mtp-rocm720,'))
|
||||
@@ -1467,7 +1434,6 @@ jobs:
|
||||
- nightly-8-gpu-kimi-k25-rocm720
|
||||
- nightly-8-gpu-qwen3-235b-rocm720
|
||||
- nightly-8-gpu-qwen35-rocm720
|
||||
- nightly-8-gpu-glm5-rocm720
|
||||
- nightly-8-gpu-glm51-rocm720
|
||||
- nightly-8-gpu-minimax-m27-rocm720
|
||||
# MI30x ROCm 7.2 Diffusion Tests
|
||||
@@ -1487,8 +1453,8 @@ jobs:
|
||||
- nightly-8-gpu-mi35x-kimi-k25-rocm720
|
||||
- nightly-8-gpu-mi35x-qwen3-235b-mxfp4-rocm720
|
||||
- nightly-8-gpu-mi35x-qwen35-rocm720
|
||||
- nightly-8-gpu-mi35x-glm5-rocm720
|
||||
- nightly-8-gpu-mi35x-glm51-rocm720
|
||||
- nightly-8-gpu-mi35x-glm5-mxfp4-rocm720
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if any job failed
|
||||
|
||||
@@ -43,9 +43,7 @@ on:
|
||||
- nightly-8-gpu-kimi-k25
|
||||
- nightly-8-gpu-qwen3-235b
|
||||
- nightly-8-gpu-qwen35
|
||||
- nightly-8-gpu-glm5
|
||||
- nightly-8-gpu-glm51
|
||||
- nightly-8-gpu-glm51-mxfp4
|
||||
- nightly-8-gpu-minimax-m27
|
||||
- nightly-1-gpu-zimage-turbo
|
||||
- nightly-test-1-gpu-mi35x
|
||||
@@ -62,9 +60,8 @@ on:
|
||||
- nightly-8-gpu-mi35x-kimi-k25
|
||||
- nightly-8-gpu-mi35x-qwen3-235b-mxfp4
|
||||
- nightly-8-gpu-mi35x-qwen35
|
||||
- nightly-8-gpu-mi35x-glm5
|
||||
- nightly-8-gpu-mi35x-glm51
|
||||
- nightly-8-gpu-mi35x-glm51-mxfp4
|
||||
- nightly-8-gpu-mi35x-glm5-mxfp4
|
||||
job_filter:
|
||||
description: 'Or type comma-separated job names (overrides dropdown if non-empty)'
|
||||
required: false
|
||||
@@ -671,50 +668,6 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# 8-GPU GLM-5 (Accuracy + Performance combined)
|
||||
nightly-8-gpu-glm5:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-glm5,'))
|
||||
runs-on: linux-mi325-8gpu-sglang
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git@96f807a33b75
|
||||
|
||||
- name: Accuracy Test (8-GPU GLM-5 NSA)
|
||||
timeout-minutes: 120
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-accuracy-8-gpu-glm5 --nightly --timeout-per-file 3600 ${{ inputs.continue_on_error && '--continue-on-error' || '' }} || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
- name: Performance Test (8-GPU GLM-5)
|
||||
timeout-minutes: 120
|
||||
continue-on-error: true # Perf test failure doesn't fail the job if accuracy passed
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e SGLANG_USE_AITER=1 \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-perf-8-gpu-glm5 --nightly --timeout-per-file 5400 ${{ inputs.continue_on_error && '--continue-on-error' || '' }} || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# 8-GPU GLM-5.1 (Accuracy + Performance combined)
|
||||
nightly-8-gpu-glm51:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-glm51,'))
|
||||
@@ -1341,40 +1294,6 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU GLM-5 (Accuracy only)
|
||||
nightly-8-gpu-mi35x-glm5:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-mi35x-glm5,'))
|
||||
runs-on: linux-mi35x-gpu-8
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh
|
||||
# Install tabulate for run_suite.py (missing in MI35x container)
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install tabulate
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git@96f807a33b75
|
||||
|
||||
- name: Accuracy Test MI35x (8-GPU GLM-5 NSA)
|
||||
timeout-minutes: 180
|
||||
run: |
|
||||
> github_summary.md # Clear summary file
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-8-gpu-mi35x-glm5 --nightly --timeout-per-file 7200 ${{ inputs.continue_on_error && '--continue-on-error' || '' }} || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU GLM-5.1 (Accuracy + Performance combined)
|
||||
nightly-8-gpu-mi35x-glm51:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-mi35x-glm51,'))
|
||||
@@ -1419,6 +1338,52 @@ jobs:
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU GLM-5-MXFP4 (Accuracy + Performance combined)
|
||||
nightly-8-gpu-mi35x-glm5-mxfp4:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-8-gpu-mi35x-glm5-mxfp4,'))
|
||||
runs-on: linux-mi35x-gpu-8
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Setup docker
|
||||
run: |
|
||||
touch github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_start_container.sh
|
||||
env:
|
||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci/amd/amd_ci_install_dependency.sh
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install tabulate
|
||||
bash scripts/ci/amd/amd_ci_exec.sh pip install git+https://github.com/huggingface/transformers.git@96f807a33b75
|
||||
|
||||
- name: Accuracy Test MI35x (8-GPU GLM-5-MXFP4)
|
||||
timeout-minutes: 180
|
||||
run: |
|
||||
> github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e SGLANG_USE_AITER=1 \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 run_suite.py --hw amd --suite nightly-amd-8-gpu-mi35x-glm5-mxfp4 --nightly --timeout-per-file 7200 ${{ inputs.continue_on_error && '--continue-on-error' || '' }} || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
- name: Performance Test MI35x (8-GPU GLM-5-MXFP4)
|
||||
timeout-minutes: 300
|
||||
continue-on-error: true
|
||||
run: |
|
||||
> github_summary.md
|
||||
bash scripts/ci/amd/amd_ci_exec.sh -w /sglang-checkout/test \
|
||||
-e SGLANG_USE_AITER=1 \
|
||||
-e GITHUB_STEP_SUMMARY="/sglang-checkout/github_summary.md" \
|
||||
python3 registered/amd/perf/mi35x/test_glm5_mxfp4_perf_mi35x.py || TEST_EXIT_CODE=$?
|
||||
echo "$(<github_summary.md )" >> $GITHUB_STEP_SUMMARY || true
|
||||
exit ${TEST_EXIT_CODE:-0}
|
||||
|
||||
# MI35x 8-GPU DeepSeek-V3.2 Performance Test (MTP)
|
||||
nightly-perf-8-gpu-mi35x-deepseek-v32-mtp:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && (!(inputs.job_filter || inputs.job_select) || (inputs.job_filter || inputs.job_select) == 'all' || contains(format(',{0},', inputs.job_filter || inputs.job_select), ',nightly-perf-8-gpu-mi35x-deepseek-v32-mtp,'))
|
||||
@@ -1476,7 +1441,6 @@ jobs:
|
||||
- nightly-8-gpu-kimi-k25
|
||||
- nightly-8-gpu-qwen3-235b
|
||||
- nightly-8-gpu-qwen35
|
||||
- nightly-8-gpu-glm5
|
||||
- nightly-8-gpu-glm51
|
||||
- nightly-8-gpu-minimax-m27
|
||||
# MI30x Diffusion Tests
|
||||
@@ -1494,8 +1458,8 @@ jobs:
|
||||
- nightly-8-gpu-mi35x-kimi-k25
|
||||
- nightly-8-gpu-mi35x-qwen3-235b-mxfp4
|
||||
- nightly-8-gpu-mi35x-qwen35
|
||||
- nightly-8-gpu-mi35x-glm5
|
||||
- nightly-8-gpu-mi35x-glm51
|
||||
- nightly-8-gpu-mi35x-glm5-mxfp4
|
||||
# MI35x perf jobs excluded from check - perf failures don't block CI
|
||||
# - nightly-perf-8-gpu-mi35x-deepseek-v32-basic
|
||||
# - nightly-perf-8-gpu-mi35x-deepseek-v32-mtp
|
||||
|
||||
@@ -0,0 +1,281 @@
|
||||
"""MI35x GLM-5-MXFP4 GSM8K Completion Evaluation Test (8-GPU)
|
||||
|
||||
Tests the AMD Quark MXFP4-quantized GLM-5 model using few-shot
|
||||
completion benchmark on MI35x.
|
||||
|
||||
Model: amd/GLM-5-MXFP4 (MOE-only MXFP4 quantization of zai-org/GLM-5)
|
||||
Reference: https://huggingface.co/amd/GLM-5-MXFP4
|
||||
|
||||
Registry: nightly-amd-8-gpu-mi35x-glm5-mxfp4 suite
|
||||
"""
|
||||
|
||||
import ast
|
||||
import os
|
||||
|
||||
os.environ.setdefault("HF_HOME", "/data2/models/huggingface")
|
||||
os.environ.setdefault("HF_HUB_CACHE", "/data2/models/huggingface/hub")
|
||||
|
||||
import re
|
||||
import time
|
||||
import unittest
|
||||
from dataclasses import dataclass
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
import numpy as np
|
||||
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.ci.ci_register import register_amd_ci
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
DEFAULT_URL_FOR_TEST,
|
||||
is_in_ci,
|
||||
popen_launch_server,
|
||||
write_github_step_summary,
|
||||
)
|
||||
from sglang.utils import download_and_cache_file, read_jsonl
|
||||
|
||||
register_amd_ci(
|
||||
est_time=5400,
|
||||
suite="nightly-amd-8-gpu-mi35x-glm5-mxfp4",
|
||||
nightly=True,
|
||||
)
|
||||
|
||||
INVALID = -9999999
|
||||
|
||||
GLM5_MXFP4_LOCAL_PATH = "/data2/models/amd-GLM-5-MXFP4"
|
||||
GLM5_MXFP4_HF_MODEL_ID = "amd/GLM-5-MXFP4"
|
||||
|
||||
|
||||
def get_model_path() -> str:
|
||||
"""Get effective model path: env var > local path > HF model ID."""
|
||||
env_path = os.environ.get("GLM5_MXFP4_MODEL_PATH")
|
||||
if env_path:
|
||||
return env_path
|
||||
if os.path.exists(GLM5_MXFP4_LOCAL_PATH):
|
||||
return GLM5_MXFP4_LOCAL_PATH
|
||||
return GLM5_MXFP4_HF_MODEL_ID
|
||||
|
||||
|
||||
@dataclass
|
||||
class ModelConfig:
|
||||
"""Configuration for a model to test."""
|
||||
|
||||
model_path: str
|
||||
tp_size: int = 8
|
||||
accuracy_threshold: float = 0.50
|
||||
other_args: Optional[List[str]] = None
|
||||
env_vars: Optional[dict] = None
|
||||
timeout: Optional[int] = None
|
||||
variant: Optional[str] = None
|
||||
|
||||
def __post_init__(self):
|
||||
if self.other_args is None:
|
||||
self.other_args = []
|
||||
if self.env_vars is None:
|
||||
self.env_vars = {}
|
||||
|
||||
def get_display_name(self) -> str:
|
||||
if self.variant:
|
||||
return f"{self.model_path} ({self.variant})"
|
||||
return self.model_path
|
||||
|
||||
|
||||
def get_glm5_mxfp4_models() -> List[ModelConfig]:
|
||||
"""Get GLM-5-MXFP4 model configurations for MI35x."""
|
||||
model_path = get_model_path()
|
||||
return [
|
||||
ModelConfig(
|
||||
model_path=model_path,
|
||||
tp_size=8,
|
||||
accuracy_threshold=0.90,
|
||||
timeout=5400,
|
||||
variant="mxfp4",
|
||||
other_args=[
|
||||
"--trust-remote-code",
|
||||
"--chunked-prefill-size",
|
||||
"131072",
|
||||
"--disable-radix-cache",
|
||||
"--mem-fraction-static",
|
||||
"0.85",
|
||||
"--context-length",
|
||||
"4096",
|
||||
"--model-loader-extra-config",
|
||||
'{"enable_multithread_load": true}',
|
||||
"--watchdog-timeout",
|
||||
"1200",
|
||||
],
|
||||
env_vars={"SGLANG_USE_AITER": "1"},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
def get_one_example(lines, i, include_answer):
|
||||
"""Format a single GSM8K example."""
|
||||
ret = "Question: " + lines[i]["question"] + "\nAnswer:"
|
||||
if include_answer:
|
||||
ret += " " + lines[i]["answer"]
|
||||
return ret
|
||||
|
||||
|
||||
def get_few_shot_examples(lines, k):
|
||||
"""Get k few-shot examples for prompting."""
|
||||
ret = ""
|
||||
for i in range(k):
|
||||
ret += get_one_example(lines, i, True) + "\n\n"
|
||||
return ret
|
||||
|
||||
|
||||
def get_answer_value(answer_str):
|
||||
"""Extract numerical answer from response."""
|
||||
answer_str = answer_str.replace(",", "")
|
||||
numbers = re.findall(r"\d+", answer_str)
|
||||
if len(numbers) < 1:
|
||||
return INVALID
|
||||
try:
|
||||
return ast.literal_eval(numbers[-1])
|
||||
except SyntaxError:
|
||||
return INVALID
|
||||
|
||||
|
||||
def run_gsm8k_benchmark(
|
||||
base_url: str,
|
||||
num_questions: int = 200,
|
||||
num_shots: int = 5,
|
||||
parallel: int = 64,
|
||||
) -> Tuple[float, float, float]:
|
||||
"""Run GSM8K few-shot completion benchmark."""
|
||||
import sglang as sgl
|
||||
from sglang.lang.backend.runtime_endpoint import RuntimeEndpoint
|
||||
|
||||
url = "https://raw.githubusercontent.com/openai/grade-school-math/master/grade_school_math/data/test.jsonl"
|
||||
data_path = download_and_cache_file(url)
|
||||
lines = list(read_jsonl(data_path))
|
||||
|
||||
few_shot_examples = get_few_shot_examples(lines, num_shots)
|
||||
|
||||
questions = []
|
||||
labels = []
|
||||
for i in range(len(lines[:num_questions])):
|
||||
questions.append(get_one_example(lines, i, False))
|
||||
labels.append(get_answer_value(lines[i]["answer"]))
|
||||
assert all(l != INVALID for l in labels)
|
||||
arguments = [{"question": q} for q in questions]
|
||||
|
||||
@sgl.function
|
||||
def few_shot_gsm8k(s, question):
|
||||
s += few_shot_examples + question
|
||||
s += sgl.gen(
|
||||
"answer", max_tokens=512, stop=["Question", "Assistant:", "<|separator|>"]
|
||||
)
|
||||
|
||||
backend = RuntimeEndpoint(base_url)
|
||||
sgl.set_default_backend(backend)
|
||||
|
||||
tic = time.perf_counter()
|
||||
states = few_shot_gsm8k.run_batch(
|
||||
arguments, temperature=0, num_threads=parallel, progress_bar=True
|
||||
)
|
||||
latency = time.perf_counter() - tic
|
||||
|
||||
preds = [get_answer_value(states[i]["answer"]) for i in range(len(states))]
|
||||
acc = np.mean(np.array(preds) == np.array(labels))
|
||||
invalid = np.mean(np.array(preds) == INVALID)
|
||||
|
||||
return float(acc), float(invalid), float(latency)
|
||||
|
||||
|
||||
class TestGLM5MXFP4EvalMI35x(unittest.TestCase):
|
||||
"""GLM-5-MXFP4 GSM8K Completion Evaluation Test for AMD MI35x."""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.models = get_glm5_mxfp4_models()
|
||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||
cls.num_questions = int(os.environ.get("GSM8K_NUM_QUESTIONS", "200"))
|
||||
|
||||
def test_glm5_mxfp4_accuracy(self):
|
||||
"""Test GLM-5-MXFP4 with GSM8K completion benchmark."""
|
||||
model_path = get_model_path()
|
||||
is_local_path = model_path.startswith("/")
|
||||
if is_local_path and not os.path.exists(model_path):
|
||||
print(f"\nSKIPPING: Local model not found at {model_path}")
|
||||
self.skipTest(f"Local model not found at {model_path}")
|
||||
return
|
||||
|
||||
if is_local_path:
|
||||
print(f"Using local model: {model_path}")
|
||||
else:
|
||||
print(f"Using HuggingFace model: {model_path}")
|
||||
|
||||
all_results = []
|
||||
summary = "### GLM-5-MXFP4 Models (MI35x)\n\n"
|
||||
summary += "| Model | Variant | TP | Accuracy | Threshold | Status |\n"
|
||||
summary += "| ----- | ------- | -- | -------- | --------- | ------ |\n"
|
||||
|
||||
for config in self.models:
|
||||
display_name = config.get_display_name()
|
||||
with self.subTest(model=display_name):
|
||||
print(f"\n{'='*60}")
|
||||
print(f"Testing: {display_name}")
|
||||
print(f"{'='*60}")
|
||||
|
||||
env = os.environ.copy()
|
||||
for key, value in config.env_vars.items():
|
||||
env[key] = value
|
||||
|
||||
other_args = list(config.other_args)
|
||||
other_args.extend(["--tp", str(config.tp_size)])
|
||||
timeout = config.timeout or DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
|
||||
|
||||
try:
|
||||
process = popen_launch_server(
|
||||
model=config.model_path,
|
||||
base_url=self.base_url,
|
||||
timeout=timeout,
|
||||
other_args=other_args,
|
||||
env=env,
|
||||
)
|
||||
|
||||
try:
|
||||
acc, invalid, latency = run_gsm8k_benchmark(
|
||||
self.base_url, num_questions=self.num_questions
|
||||
)
|
||||
passed = acc >= config.accuracy_threshold
|
||||
status = "PASS" if passed else "FAIL"
|
||||
print(
|
||||
f" accuracy={acc:.3f} threshold={config.accuracy_threshold} {status}"
|
||||
)
|
||||
|
||||
all_results.append(
|
||||
{
|
||||
"model": display_name,
|
||||
"accuracy": acc,
|
||||
"passed": passed,
|
||||
}
|
||||
)
|
||||
summary += f"| {config.model_path} | {config.variant or 'N/A'} | {config.tp_size} | {acc:.3f} | {config.accuracy_threshold} | {status} |\n"
|
||||
|
||||
finally:
|
||||
kill_process_tree(process.pid)
|
||||
|
||||
except Exception as e:
|
||||
summary += f"| {config.model_path} | {config.variant or 'N/A'} | {config.tp_size} | N/A | {config.accuracy_threshold} | ERROR |\n"
|
||||
all_results.append(
|
||||
{
|
||||
"model": display_name,
|
||||
"accuracy": None,
|
||||
"passed": False,
|
||||
"error": str(e),
|
||||
}
|
||||
)
|
||||
|
||||
if is_in_ci():
|
||||
write_github_step_summary(summary)
|
||||
|
||||
failed = [r for r in all_results if not r["passed"]]
|
||||
if failed:
|
||||
raise AssertionError(f"Failed models: {[r['model'] for r in failed]}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -0,0 +1,187 @@
|
||||
"""MI35x Nightly performance benchmark for GLM-5-MXFP4 model.
|
||||
|
||||
Benchmarks the AMD Quark MXFP4-quantized GLM-5 model on MI35x with 8 GPUs.
|
||||
|
||||
Model: amd/GLM-5-MXFP4 (MOE-only MXFP4 quantization of zai-org/GLM-5)
|
||||
Reference: https://huggingface.co/amd/GLM-5-MXFP4
|
||||
|
||||
Registry: nightly-perf-8-gpu-mi35x-glm5-mxfp4 suite
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
os.environ.setdefault("HF_HOME", "/data2/models/huggingface")
|
||||
os.environ.setdefault("HF_HUB_CACHE", "/data2/models/huggingface/hub")
|
||||
|
||||
import unittest
|
||||
from typing import List
|
||||
|
||||
from sglang.test.ci.ci_register import register_amd_ci
|
||||
from sglang.test.nightly_bench_utils import BenchmarkResult
|
||||
from sglang.test.nightly_utils import NightlyBenchmarkRunner
|
||||
from sglang.test.test_utils import DEFAULT_URL_FOR_TEST, _parse_int_list_env
|
||||
|
||||
register_amd_ci(
|
||||
est_time=18000,
|
||||
suite="nightly-perf-8-gpu-mi35x-glm5-mxfp4",
|
||||
nightly=True,
|
||||
)
|
||||
|
||||
|
||||
def generate_simple_markdown_report(results: List[BenchmarkResult]) -> str:
|
||||
"""Generate a simplified markdown report without traces and cost columns.
|
||||
|
||||
Skips the first result if it's a warmup run (duplicate batch_size).
|
||||
"""
|
||||
model_header = results[0].model_path
|
||||
if results[0].run_name and results[0].run_name != "default":
|
||||
model_header += f" ({results[0].run_name})"
|
||||
|
||||
gpu_config = os.getenv("GPU_CONFIG", "MI35x")
|
||||
if gpu_config:
|
||||
model_header += f" [{gpu_config}]"
|
||||
|
||||
summary = f"### {model_header}\n"
|
||||
summary += "| batch size | input len | latency (s) | input throughput (tok/s) | output throughput (tok/s) | ITL (ms) |\n"
|
||||
summary += "| ---------- | --------- | ----------- | ------------------------ | ------------------------- | -------- |\n"
|
||||
|
||||
report_results = (
|
||||
results[1:]
|
||||
if len(results) > 1 and results[0].batch_size == results[1].batch_size
|
||||
else results
|
||||
)
|
||||
|
||||
for result in report_results:
|
||||
itl = (
|
||||
1 / (result.output_throughput / result.batch_size) * 1000
|
||||
if result.output_throughput > 0
|
||||
else 0
|
||||
)
|
||||
summary += f"| {result.batch_size} | {result.input_len} | {result.latency:.2f} | {result.input_throughput:.2f} | {result.output_throughput:.2f} | {itl:.2f} |\n"
|
||||
|
||||
return summary
|
||||
|
||||
|
||||
GLM5_MXFP4_LOCAL_PATH = "/data2/models/amd-GLM-5-MXFP4"
|
||||
GLM5_MXFP4_HF_MODEL_ID = "amd/GLM-5-MXFP4"
|
||||
PROFILE_DIR = "performance_profiles_glm5_mxfp4_mi35x"
|
||||
|
||||
|
||||
def get_model_path() -> str:
|
||||
"""Get effective model path: env var > local path > HF model ID."""
|
||||
env_path = os.environ.get("GLM5_MXFP4_MODEL_PATH")
|
||||
if env_path:
|
||||
return env_path
|
||||
if os.path.exists(GLM5_MXFP4_LOCAL_PATH):
|
||||
return GLM5_MXFP4_LOCAL_PATH
|
||||
return GLM5_MXFP4_HF_MODEL_ID
|
||||
|
||||
|
||||
class TestGLM5MXFP4PerfMI35x(unittest.TestCase):
|
||||
"""MI35x Nightly performance benchmark for GLM-5-MXFP4 model."""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.model = get_model_path()
|
||||
print(f"Using model path: {cls.model}")
|
||||
cls.base_url = DEFAULT_URL_FOR_TEST
|
||||
cls.batch_sizes = [1, 8, 16, 64]
|
||||
cls.input_lens = tuple(_parse_int_list_env("NIGHTLY_INPUT_LENS", "1024"))
|
||||
cls.output_lens = tuple(_parse_int_list_env("NIGHTLY_OUTPUT_LENS", "1024"))
|
||||
|
||||
cls.variants = [
|
||||
{
|
||||
"name": "basic",
|
||||
"other_args": [
|
||||
"--trust-remote-code",
|
||||
"--tp",
|
||||
"8",
|
||||
"--chunked-prefill-size",
|
||||
"131072",
|
||||
"--disable-radix-cache",
|
||||
"--mem-fraction-static",
|
||||
"0.85",
|
||||
"--context-length",
|
||||
"4096",
|
||||
"--model-loader-extra-config",
|
||||
'{"enable_multithread_load": true}',
|
||||
"--watchdog-timeout",
|
||||
"1200",
|
||||
"--reasoning-parser",
|
||||
"glm45",
|
||||
"--tool-call-parser",
|
||||
"glm47",
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
cls.runner = NightlyBenchmarkRunner(PROFILE_DIR, cls.__name__, cls.base_url)
|
||||
cls.runner.setup_profile_directory()
|
||||
cls.runner.full_report = f"## {cls.__name__}\n"
|
||||
|
||||
def test_bench_one_batch(self):
|
||||
"""Run benchmark across all configured variants."""
|
||||
failed_variants = []
|
||||
|
||||
is_local_path = self.model.startswith("/")
|
||||
if is_local_path and not os.path.exists(self.model):
|
||||
print(f"\nSKIPPING: Local model not found at {self.model}")
|
||||
self.runner.full_report += (
|
||||
f"\nTest skipped: Local model not found at {self.model}\n"
|
||||
)
|
||||
self.runner.write_final_report()
|
||||
return
|
||||
|
||||
if is_local_path:
|
||||
print(f"Using local model: {self.model}")
|
||||
else:
|
||||
print(
|
||||
f"Using HuggingFace model: {self.model} (will download if not cached)"
|
||||
)
|
||||
|
||||
old_env = {}
|
||||
env_vars = {"SGLANG_USE_AITER": "1"}
|
||||
for key, value in env_vars.items():
|
||||
old_env[key] = os.environ.get(key)
|
||||
os.environ[key] = value
|
||||
|
||||
try:
|
||||
for variant_config in self.variants:
|
||||
with self.subTest(variant=variant_config["name"]):
|
||||
result_tuple = self.runner.run_benchmark_for_model(
|
||||
model_path=self.model,
|
||||
batch_sizes=self.batch_sizes,
|
||||
input_lens=self.input_lens,
|
||||
output_lens=self.output_lens,
|
||||
other_args=variant_config["other_args"],
|
||||
variant=variant_config["name"],
|
||||
extra_bench_args=["--trust-remote-code"],
|
||||
enable_profile=False,
|
||||
)
|
||||
results = result_tuple[0]
|
||||
success = result_tuple[1]
|
||||
|
||||
if not success:
|
||||
failed_variants.append(variant_config["name"])
|
||||
|
||||
if results:
|
||||
self.runner.full_report += (
|
||||
generate_simple_markdown_report(results) + "\n"
|
||||
)
|
||||
finally:
|
||||
for key, value in old_env.items():
|
||||
if value is None:
|
||||
os.environ.pop(key, None)
|
||||
else:
|
||||
os.environ[key] = value
|
||||
self.runner.write_final_report()
|
||||
|
||||
if failed_variants:
|
||||
raise AssertionError(
|
||||
f"Benchmark failed for {self.model} with the following variants: "
|
||||
f"{', '.join(failed_variants)}"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user