Enable unit tests for AMD CI. (#6283)
This commit is contained in:
126
.github/workflows/pr-test-amd.yml
vendored
126
.github/workflows/pr-test-amd.yml
vendored
@@ -325,11 +325,135 @@ jobs:
|
||||
run: |
|
||||
docker exec -w /sglang-checkout/test/srt -e SGLANG_IS_IN_CI=1 -e SGLANG_AMD_CI=1 ci_sglang python3 -m unittest test_bench_serving.TestBenchServing.test_moe_offline_throughput_without_radix_cache
|
||||
|
||||
unit-test-backend-1-gpu-amd:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
|
||||
github.event.pull_request.draft == false
|
||||
strategy:
|
||||
matrix:
|
||||
runner: [linux-mi300-gpu-1, linux-mi325-gpu-1]
|
||||
runs-on: ${{matrix.runner}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup docker
|
||||
run: |
|
||||
# Ensure GPU isolation if pod is part of kubernetes setup with DEVICE_FLAG.
|
||||
if [ -f "/etc/podinfo/gha-render-devices" ]; then
|
||||
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
|
||||
else
|
||||
DEVICE_FLAG="--device /dev/dri"
|
||||
fi
|
||||
docker pull lmsysorg/sglang:v0.4.6.post3-rocm630
|
||||
docker run -dt --user root --device=/dev/kfd $DEVICE_FLAG \
|
||||
-v ${{ github.workspace }}:/sglang-checkout --ipc=host --group-add video \
|
||||
--cap-add=SYS_PTRACE -e HF_TOKEN=${HF_TOKEN} --security-opt seccomp=unconfined \
|
||||
-w /sglang-checkout --name ci_sglang \
|
||||
lmsysorg/sglang:v0.4.6.post3-rocm630
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
docker exec ci_sglang pip install --upgrade pip
|
||||
docker exec ci_sglang pip uninstall sgl-kernel -y || true
|
||||
docker exec -w /sglang-checkout/sgl-kernel ci_sglang bash -c "rm -f pyproject.toml && mv pyproject_rocm.toml pyproject.toml && python3 setup_rocm.py install"
|
||||
docker exec ci_sglang pip install -e "python[dev_hip]"
|
||||
|
||||
docker exec -w / ci_sglang git clone https://github.com/merrymercy/human-eval.git
|
||||
docker exec -w /human-eval ci_sglang pip install -e .
|
||||
|
||||
- name: Run test
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
docker exec -w /sglang-checkout/test/srt -e SGLANG_IS_IN_CI=1 -e SGLANG_AMD_CI=1 -e SGLANG_AITER_MOE=1 ci_sglang python3 run_suite.py --suite per-commit-amd
|
||||
|
||||
unit-test-backend-2-gpu-amd:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
|
||||
github.event.pull_request.draft == false
|
||||
strategy:
|
||||
matrix:
|
||||
runner: [linux-mi300-gpu-2, linux-mi325-gpu-2]
|
||||
runs-on: ${{matrix.runner}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup docker
|
||||
run: |
|
||||
# Ensure GPU isolation if pod is part of kubernetes setup with DEVICE_FLAG.
|
||||
if [ -f "/etc/podinfo/gha-render-devices" ]; then
|
||||
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
|
||||
else
|
||||
DEVICE_FLAG="--device /dev/dri"
|
||||
fi
|
||||
docker pull lmsysorg/sglang:v0.4.6.post3-rocm630
|
||||
docker run -dt --user root --device=/dev/kfd $DEVICE_FLAG \
|
||||
-v ${{ github.workspace }}:/sglang-checkout --ipc=host --group-add video \
|
||||
--cap-add=SYS_PTRACE -e HF_TOKEN=${HF_TOKEN} --security-opt seccomp=unconfined \
|
||||
-w /sglang-checkout --name ci_sglang \
|
||||
lmsysorg/sglang:v0.4.6.post3-rocm630
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
docker exec ci_sglang pip install --upgrade pip
|
||||
docker exec ci_sglang pip uninstall sgl-kernel -y || true
|
||||
docker exec -w /sglang-checkout/sgl-kernel ci_sglang bash -c "rm -f pyproject.toml && mv pyproject_rocm.toml pyproject.toml && python3 setup_rocm.py install"
|
||||
docker exec ci_sglang pip install -e "python[dev_hip]"
|
||||
|
||||
docker exec -w / ci_sglang git clone https://github.com/merrymercy/human-eval.git
|
||||
docker exec -w /human-eval ci_sglang pip install -e .
|
||||
|
||||
- name: Run test
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
docker exec -w /sglang-checkout/test/srt -e SGLANG_IS_IN_CI=1 -e SGLANG_AMD_CI=1 -e SGLANG_AITER_MOE=1 ci_sglang python3 run_suite.py --suite per-commit-2-gpu-amd
|
||||
|
||||
unit-test-backend-8-gpu-amd:
|
||||
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
|
||||
github.event.pull_request.draft == false
|
||||
strategy:
|
||||
matrix:
|
||||
runner: [linux-mi300-gpu-8, linux-mi325-gpu-8]
|
||||
runs-on: ${{matrix.runner}}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup docker
|
||||
run: |
|
||||
# Ensure GPU isolation if pod is part of kubernetes setup with DEVICE_FLAG.
|
||||
if [ -f "/etc/podinfo/gha-render-devices" ]; then
|
||||
DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices)
|
||||
else
|
||||
DEVICE_FLAG="--device /dev/dri"
|
||||
fi
|
||||
docker pull lmsysorg/sglang:v0.4.6.post3-rocm630
|
||||
docker run -dt --user root --device=/dev/kfd $DEVICE_FLAG \
|
||||
-v ${{ github.workspace }}:/sglang-checkout --ipc=host --group-add video \
|
||||
--cap-add=SYS_PTRACE -e HF_TOKEN=${HF_TOKEN} --security-opt seccomp=unconfined \
|
||||
-w /sglang-checkout --name ci_sglang \
|
||||
lmsysorg/sglang:v0.4.6.post3-rocm630
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
docker exec ci_sglang pip install --upgrade pip
|
||||
docker exec ci_sglang pip uninstall sgl-kernel -y || true
|
||||
docker exec -w /sglang-checkout/sgl-kernel ci_sglang bash -c "rm -f pyproject.toml && mv pyproject_rocm.toml pyproject.toml && python3 setup_rocm.py install"
|
||||
docker exec ci_sglang pip install -e "python[dev_hip]"
|
||||
|
||||
docker exec -w / ci_sglang git clone https://github.com/merrymercy/human-eval.git
|
||||
docker exec -w /human-eval ci_sglang pip install -e .
|
||||
|
||||
- name: Run test
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
docker exec -w /sglang-checkout/test/srt -e SGLANG_IS_IN_CI=1 -e SGLANG_AMD_CI=1 -e SGLANG_AITER_MOE=1 ci_sglang python3 run_suite.py --suite per-commit-8-gpu-amd
|
||||
|
||||
finish:
|
||||
if: always()
|
||||
needs: [
|
||||
accuracy-test-1-gpu-amd, mla-test-1-gpu-amd, bench-test-2-gpu-amd,
|
||||
accuracy-test-2-gpu-amd, performance-test-1-gpu-part-1-amd, performance-test-1-gpu-part-2-amd
|
||||
accuracy-test-2-gpu-amd, performance-test-1-gpu-part-1-amd, performance-test-1-gpu-part-2-amd,
|
||||
unit-test-backend-1-gpu-amd, unit-test-backend-2-gpu-amd, unit-test-backend-8-gpu-amd
|
||||
]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user