|
| 1 | +# ============================================================================= |
| 2 | +# Multi-node SGLang integration test pipeline. |
| 3 | +# |
| 4 | +# This pipeline runs MSCCL++ SGLang tests across two H100 VMSS GPU nodes. |
| 5 | +# High-level flow: |
| 6 | +# 1. The pipeline agent runs inside a container on the `mscclpp-multi-node` |
| 7 | +# pool. The agent itself has no GPUs. |
| 8 | +# 2. SSH/host configuration is generated so the agent can reach the two |
| 9 | +# pre-provisioned VMSS GPU nodes. |
| 10 | +# 3. `templates/deploy.yml` builds and ships MSCCL++ to the GPU nodes. |
| 11 | +# 4. `templates/sglang-multi-test.yml` runs the SGLang multi-node tests. |
| 12 | +# 5. `templates/stop.yml` tears down / stops the VMSS nodes. |
| 13 | +# |
| 14 | +# Docs / non-code changes are excluded from triggering this pipeline. |
| 15 | +# ============================================================================= |
| 16 | + |
| 17 | +trigger: |
| 18 | + branches: |
| 19 | + include: |
| 20 | + - main |
| 21 | + - release/* |
| 22 | + paths: |
| 23 | + exclude: |
| 24 | + - .devcontainer/** |
| 25 | + - .github/** |
| 26 | + - docker/** |
| 27 | + - docs/** |
| 28 | + - '**/*.md' |
| 29 | + |
| 30 | +pr: |
| 31 | + branches: |
| 32 | + include: |
| 33 | + - main |
| 34 | + - release/* |
| 35 | + drafts: false |
| 36 | + paths: |
| 37 | + exclude: |
| 38 | + - .devcontainer/** |
| 39 | + - .github/** |
| 40 | + - docker/** |
| 41 | + - docs/** |
| 42 | + - '**/*.md' |
| 43 | + |
| 44 | +parameters: |
| 45 | +# Name of the pre-provisioned Azure VMSS that hosts the GPU test nodes. |
| 46 | +# Node hostnames are derived as "${vmssName}000000" and "${vmssName}000001". |
| 47 | +- name: vmssName |
| 48 | + type: string |
| 49 | + default: mscclpp-h100-multinode-ci |
| 50 | +# Static /etc/hosts entries mapping VMSS node hostnames to their private IPs. |
| 51 | +# These IPs are tied to the specific VMSS above; update both together if the |
| 52 | +# VMSS is reprovisioned or renamed. |
| 53 | +- name: hostEntries |
| 54 | + type: string |
| 55 | + default: | |
| 56 | + 10.0.0.5 mscclpp-h100-multinode-ci000000 |
| 57 | + 10.0.0.4 mscclpp-h100-multinode-ci000001 |
| 58 | +# Docker image used for the SGLang test container on the GPU nodes. |
| 59 | +- name: sglangImage |
| 60 | + type: string |
| 61 | + default: lmsysorg/sglang:latest-cu129 |
| 62 | + |
| 63 | +jobs: |
| 64 | +- job: SGLangTestMultiNode |
| 65 | + displayName: SGLang Test Multi Node |
| 66 | + strategy: |
| 67 | + matrix: |
| 68 | + cuda12: |
| 69 | + containerImage: ghcr.io/microsoft/mscclpp/mscclpp:base-dev-cuda12.9 |
| 70 | + pool: |
| 71 | + name: mscclpp-multi-node |
| 72 | + container: |
| 73 | + image: $(containerImage) |
| 74 | + |
| 75 | + steps: |
| 76 | + # Ensure the VMSS node hostnames resolve from the pipeline agent container. |
| 77 | + # Idempotent: only appends lines that are not already present in /etc/hosts. |
| 78 | + - task: Bash@3 |
| 79 | + displayName: Add HostEntry |
| 80 | + inputs: |
| 81 | + targetType: 'inline' |
| 82 | + script: | |
| 83 | + while IFS= read -r line; do |
| 84 | + [ -z "$line" ] && continue |
| 85 | + if ! grep -qxF "$line" /etc/hosts; then |
| 86 | + echo "Adding to /etc/hosts: $line" |
| 87 | + echo "$line" | sudo tee -a /etc/hosts |
| 88 | + else |
| 89 | + echo "Entry already exists: $line" |
| 90 | + fi |
| 91 | + done <<< "${{ parameters.hostEntries }}" |
| 92 | +
|
| 93 | + # Generate the SSH config and hostfile consumed by the deploy / test |
| 94 | + # templates below: |
| 95 | + # - config : SSH client config (custom port + key) for each node |
| 96 | + # - hostfile : user@host list used by deploy / test scripts (parallel-ssh) |
| 97 | + - task: Bash@3 |
| 98 | + displayName: Generate deploy files |
| 99 | + inputs: |
| 100 | + targetType: 'inline' |
| 101 | + script: | |
| 102 | + set -e |
| 103 | + VMSS="${{ parameters.vmssName }}" |
| 104 | + DEPLOY_DIR="$(System.DefaultWorkingDirectory)/test/deploy" |
| 105 | + NODE0="${VMSS}000000" |
| 106 | + NODE1="${VMSS}000001" |
| 107 | +
|
| 108 | + echo "Host ${NODE0} |
| 109 | + Port 22345 |
| 110 | + IdentityFile /root/mscclpp/sshkey |
| 111 | + StrictHostKeyChecking no |
| 112 | + Host ${NODE1} |
| 113 | + Port 22345 |
| 114 | + IdentityFile /root/mscclpp/sshkey |
| 115 | + StrictHostKeyChecking no" > "${DEPLOY_DIR}/config" |
| 116 | +
|
| 117 | + printf '%s\n%s\n' "azureuser@${NODE0}" "azureuser@${NODE1}" > "${DEPLOY_DIR}/hostfile" |
| 118 | +
|
| 119 | + # Build MSCCL++ and deploy it onto the VMSS GPU nodes. |
| 120 | + - template: templates/deploy.yml |
| 121 | + parameters: |
| 122 | + subscription: mscclpp-ci-h100 |
| 123 | + vmssName: ${{ parameters.vmssName }} |
| 124 | + resourceGroup: mscclpp |
| 125 | + gpuArch: '90' |
| 126 | + deployArgs: 'multi-node-test true cuda' |
| 127 | + containerName: 'sglang-mscclpp-test' |
| 128 | + sglangImage: ${{ parameters.sglangImage }} |
| 129 | + |
| 130 | + # Run the SGLang multi-node tests across the two GPU nodes. |
| 131 | + - template: templates/sglang-multi-test.yml |
| 132 | + parameters: |
| 133 | + subscription: mscclpp-ci-h100 |
| 134 | + vmssName: ${{ parameters.vmssName }} |
| 135 | + |
| 136 | + # Stop/deallocate the VMSS GPU nodes to release resources. |
| 137 | + - template: templates/stop.yml |
| 138 | + parameters: |
| 139 | + subscription: mscclpp-ci-h100 |
| 140 | + vmssName: ${{ parameters.vmssName }} |
| 141 | + resourceGroup: mscclpp |
0 commit comments