Skip to content

Commit e002f52

Browse files
committed
ci(musa): add S5000 CI workflow
1 parent 8a1c299 commit e002f52

21 files changed

Lines changed: 389 additions & 8 deletions

File tree

.github/configs/musa.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2026 FlagOS Contributors
2+
# Licensed under the Apache License, Version 2.0.
3+
4+
platform: musa
5+
6+
ci_image: harbor.baai.ac.cn/flagos-dev/vllm-plugin-fl:29ceebd-musa-ci
7+
8+
runner_labels:
9+
- mt-cicd-vllm-plugin
10+
11+
container_volumes:
12+
- /data:/data
13+
- /workspace:/workspace
14+
- /hsdatapool:/hsdatapool
15+
16+
container_options: >-
17+
--hostname vllm-plugin-fl
18+
--privileged
19+
--ipc=host
20+
--shm-size=64g
21+
--env GEMS_VENDOR=mthreads
22+
--env VLLM_PLUGINS=fl
23+
--env MTHREADS_VISIBLE_DEVICES=all

.github/configs/platforms.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ platforms:
2626
enabled: false
2727
hygon:
2828
enabled: true
29+
musa:
30+
enabled: true

.github/scripts/musa/check.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
# Copyright (c) 2026 BAAI. All rights reserved.
3+
# Check Moore Threads MUSA availability.
4+
set -euo pipefail
5+
6+
echo "Current time: $(date '+%Y-%m-%d %H:%M:%S')"
7+
echo "=== Checking Moore Threads MUSA availability ==="
8+
9+
if command -v mthreads-gmi >/dev/null 2>&1; then
10+
mthreads-gmi
11+
else
12+
echo "::warning::mthreads-gmi not found; checking through torch_musa."
13+
fi
14+
15+
python - <<'PY'
16+
import torch
17+
import torch_musa
18+
19+
assert torch.musa.is_available(), "MUSA accelerator is unavailable"
20+
count = torch.musa.device_count()
21+
assert count > 0, "No MUSA devices detected"
22+
23+
tensor = torch.ones((32, 32), device="musa:0")
24+
torch.musa.synchronize()
25+
26+
print(f"MUSA devices: {count}")
27+
print(f"Tensor smoke: {tensor.device} {tuple(tensor.shape)}")
28+
PY

.github/scripts/musa/setup.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
# Copyright (c) 2026 BAAI. All rights reserved.
3+
# Setup script for Moore Threads MUSA CI environment.
4+
set -euo pipefail
5+
6+
git config --global --add safe.directory "$(pwd)"
7+
8+
: "${GEMS_VENDOR:?GEMS_VENDOR is not set}"
9+
: "${VLLM_PLUGINS:?VLLM_PLUGINS is not set}"
10+
: "${MTHREADS_VISIBLE_DEVICES:?MTHREADS_VISIBLE_DEVICES is not set}"
11+
12+
python -m pip install --no-build-isolation --no-deps -e .
13+
14+
python - <<'PY'
15+
import flag_gems
16+
import torch
17+
import torch_musa
18+
import vllm
19+
import vllm_fl
20+
from vllm.platforms import current_platform
21+
22+
assert torch.musa.is_available(), "MUSA accelerator is unavailable"
23+
assert torch.musa.device_count() > 0, "No MUSA devices detected"
24+
assert current_platform.device_type == "musa", current_platform.device_type
25+
26+
print(f"vLLM import ok: {vllm.__version__}")
27+
print(f"vLLM-FL import ok: {vllm_fl.__file__}")
28+
print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}")
29+
print(f"Torch import ok: {torch.__version__}")
30+
print(f"MUSA available: {torch.musa.is_available()}")
31+
print(f"MUSA devices: {torch.musa.device_count()}")
32+
print(f"Platform: {current_platform}")
33+
PY

.github/workflows/_benchmark_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090
- name: Upload test results
9191
if: always()
9292
uses: actions/upload-artifact@v4
93+
continue-on-error: true
9394
with:
9495
name: benchmark-${{ inputs.platform }}
9596
path: |

.github/workflows/_build_wheel.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
- name: Upload wheel
7878
if: inputs.upload-artifact
7979
uses: actions/upload-artifact@v4
80+
continue-on-error: true
8081
with:
8182
name: wheel
8283
path: dist/*.whl

.github/workflows/_e2e_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
- name: Upload test results
109109
if: always()
110110
uses: actions/upload-artifact@v4
111+
continue-on-error: true
111112
with:
112113
name: e2e-${{ inputs.platform }}-${{ inputs.device }}-${{ inputs.task }}
113114
path: |

.github/workflows/_functional_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090
- name: Upload test results
9191
if: always()
9292
uses: actions/upload-artifact@v4
93+
continue-on-error: true
9394
with:
9495
name: functional-${{ inputs.platform }}
9596
path: |

.github/workflows/_unit_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ jobs:
8989
- name: Upload coverage report
9090
if: inputs.upload_coverage && always()
9191
uses: actions/upload-artifact@v4
92+
continue-on-error: true
9293
with:
9394
name: coverage-${{ inputs.platform }}
9495
path: |

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,14 @@ jobs:
133133
with:
134134
platform: hygon
135135
secrets: inherit
136+
137+
# ============================================================
138+
# Job 4d: MUSA platform testing
139+
# ============================================================
140+
test-musa:
141+
needs: discover
142+
if: contains(fromJson(needs.discover.outputs.platforms), 'musa')
143+
uses: ./.github/workflows/_platform_test.yml
144+
with:
145+
platform: musa
146+
secrets: inherit

0 commit comments

Comments
 (0)