Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion .github/workflows/pr-test-amd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,46 @@ jobs:
run: |
bash scripts/amd_ci_exec.sh python3 run_suite.py --suite per-commit-8-gpu-amd --timeout-per-file 3600

- name: Run CustomAllReduce test
timeout-minutes: 10
run: |
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 bash scripts/amd_ci_exec.sh python3 -m unittest test_custom_allreduce.TestCustomAllReduce

unit-test-sgl-kernel-amd:
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
runner: [linux-mi300-gpu-1, linux-mi325-gpu-1]
part: [0, 1, 2, 3, 4, 5]
runs-on: ${{matrix.runner}}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Start CI container
run: bash scripts/amd_ci_start_container.sh
env:
GITHUB_WORKSPACE: ${{ github.workspace }}

- name: Install dependencies
run: bash scripts/amd_ci_install_dependency.sh

- name: Run test #### TODO: sgl-kernel/test
timeout-minutes: 10
run: |
bash scripts/amd_ci_exec.sh pytest test_moe_align.py
bash scripts/amd_ci_exec.sh pytest test_moe_topk_softmax.py
bash scripts/amd_ci_exec.sh pytest test_eagle_utils.py

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,
unit-test-backend-1-gpu-amd, unit-test-backend-2-gpu-amd, unit-test-backend-8-gpu-amd
unit-test-backend-1-gpu-amd, unit-test-backend-2-gpu-amd, unit-test-backend-8-gpu-amd,
unit-test-sgl-kernel-amd
]
runs-on: ubuntu-latest
steps:
Expand Down
18 changes: 13 additions & 5 deletions test/srt/test_custom_allreduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,21 @@ def multi_process_parallel(


class TestCustomAllReduce(CustomTestCase):
test_sizes = [
512,
4096,
32768,
262144,
2097152,
16777216,
33554432,
] # 512 B … 32 MB
world_sizes = [2, 4, 6, 8]
test_loop = 10

@classmethod
def setUpClass(cls):
random.seed(42)
# 512B to 32MB
cls.test_sizes = [512, 4096, 32768, 262144, 2097152, 16777216, 33554432]
cls.world_sizes = [2, 4, 6, 8]
cls.test_loop = 10
random.seed(42) # keep the deterministic seed

def test_graph_allreduce(self):
for world_size in self.world_sizes:
Expand Down
Loading