-
Notifications
You must be signed in to change notification settings - Fork 102
[CICD] Unify Qwen3.6 tests and consolidate MUSA/MetaX/Ascend CI updates #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
03b71a1
d3aea86
70a0680
dd78bf6
6948be2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Copyright 2026 FlagOS Contributors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # MUSA Hardware Configuration | ||
| # This file defines CI/CD settings for MUSA testing. | ||
|
|
||
| platform: musa | ||
|
|
||
| ci_image: harbor.baai.ac.cn/flagos-dev/vllm-plugin-fl:v0.20.2-musa-ci | ||
|
|
||
| runner_labels: | ||
| - mt-cicd-vllm-plugin | ||
|
|
||
| container_volumes: | ||
| - /data:/data | ||
|
|
||
| container_options: >- | ||
| --hostname vllm-plugin-fl | ||
| --privileged | ||
| --ipc=host | ||
| --shm-size=64g | ||
| --env GEMS_VENDOR=mthreads | ||
| --env VLLM_PLUGINS=fl | ||
| --env MTHREADS_VISIBLE_DEVICES=all |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| #!/bin/bash | ||
| # Copyright 2026 FlagOS Contributors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Provision models on the host-mounted /data volume. Images must not contain | ||
| # model weights; every platform test refers to the same host path convention. | ||
| set -euo pipefail | ||
|
|
||
| export FL_MODEL_BASE_PATH="${FL_MODEL_BASE_PATH:-/data/models}" | ||
| export HF_ENDPOINT="${HF_ENDPOINT:-https://hf-mirror.com}" | ||
|
|
||
| QWEN_ROOT="${FL_MODEL_BASE_PATH}/Qwen" | ||
| HF_MODEL_ID="Qwen/Qwen3-0.6B" | ||
| MODELSCOPE_MODEL_IDS=( | ||
| "Qwen/Qwen3.6-27B" | ||
| "Qwen/Qwen3.6-35B-A3B" | ||
| ) | ||
|
|
||
| mkdir -p "${QWEN_ROOT}" | ||
|
|
||
| MODEL_DIR="${QWEN_ROOT}/${HF_MODEL_ID#Qwen/}" | ||
| if [[ -f "${MODEL_DIR}/config.json" ]]; then | ||
| echo "Model already available: ${MODEL_DIR}" | ||
| else | ||
| export MODEL_ID="${HF_MODEL_ID}" MODEL_DIR | ||
| echo "Downloading ${MODEL_ID} from ${HF_ENDPOINT} to ${MODEL_DIR}" | ||
| python - <<'PY' | ||
| import os | ||
|
|
||
| from huggingface_hub import snapshot_download | ||
|
|
||
|
|
||
| snapshot_download( | ||
| repo_id=os.environ["MODEL_ID"], | ||
| local_dir=os.environ["MODEL_DIR"], | ||
| endpoint=os.environ["HF_ENDPOINT"], | ||
| ) | ||
| PY | ||
| test -f "${MODEL_DIR}/config.json" | ||
| echo "Model ready: ${MODEL_DIR}" | ||
| fi | ||
|
|
||
| if ! command -v modelscope >/dev/null 2>&1; then | ||
| pip install modelscope --break-system-packages | ||
| fi | ||
|
|
||
| for MODEL_ID in "${MODELSCOPE_MODEL_IDS[@]}"; do | ||
| MODEL_DIR="${QWEN_ROOT}/${MODEL_ID#Qwen/}" | ||
| if [[ -f "${MODEL_DIR}/config.json" ]]; then | ||
| echo "Model already available: ${MODEL_DIR}" | ||
| continue | ||
| fi | ||
|
|
||
| echo "Downloading ${MODEL_ID} from ModelScope to ${MODEL_DIR}" | ||
| modelscope download --model "${MODEL_ID}" --local_dir "${MODEL_DIR}" | ||
| test -f "${MODEL_DIR}/config.json" | ||
| echo "Model ready: ${MODEL_DIR}" | ||
| done |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/bin/bash | ||
| # Copyright (c) 2026 BAAI. All rights reserved. | ||
| # Check Moore Threads MUSA availability. | ||
| set -euo pipefail | ||
|
|
||
| echo "Current time: $(date '+%Y-%m-%d %H:%M:%S')" | ||
| echo "=== Checking Moore Threads MUSA availability ===" | ||
|
|
||
| if command -v mthreads-gmi >/dev/null 2>&1; then | ||
| mthreads-gmi | ||
| else | ||
| echo "::warning::mthreads-gmi not found; checking through torch_musa." | ||
| fi | ||
|
|
||
| python - <<'PY' | ||
| import torch | ||
| import torch_musa | ||
|
|
||
| assert torch.musa.is_available(), "MUSA accelerator is unavailable" | ||
| count = torch.musa.device_count() | ||
| assert count > 0, "No MUSA devices detected" | ||
|
|
||
| tensor = torch.ones((32, 32), device="musa:0") | ||
| torch.musa.synchronize() | ||
|
|
||
| print(f"MUSA devices: {count}") | ||
| print(f"Tensor smoke: {tensor.device} {tuple(tensor.shape)}") | ||
| PY |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/bin/bash | ||
| # Copyright (c) 2026 BAAI. All rights reserved. | ||
| # Setup script for Moore Threads MUSA CI environment. | ||
| set -euo pipefail | ||
|
|
||
| git config --global --add safe.directory "$(pwd)" | ||
|
|
||
| : "${GEMS_VENDOR:?GEMS_VENDOR is not set}" | ||
| : "${VLLM_PLUGINS:?VLLM_PLUGINS is not set}" | ||
| : "${MTHREADS_VISIBLE_DEVICES:?MTHREADS_VISIBLE_DEVICES is not set}" | ||
|
|
||
| python -m pip install --no-build-isolation --no-deps -e . | ||
|
|
||
| python - <<'PY' | ||
| import flag_gems | ||
| import torch | ||
| import torch_musa | ||
| import vllm | ||
| import vllm_fl | ||
| from vllm.platforms import current_platform | ||
|
|
||
| assert torch.musa.is_available(), "MUSA accelerator is unavailable" | ||
| assert torch.musa.device_count() > 0, "No MUSA devices detected" | ||
| assert current_platform.device_type == "musa", current_platform.device_type | ||
|
|
||
| print(f"vLLM import ok: {vllm.__version__}") | ||
| print(f"vLLM-FL import ok: {vllm_fl.__file__}") | ||
| print(f"FlagGems import ok: {getattr(flag_gems, '__version__', 'unknown')}") | ||
| print(f"Torch import ok: {torch.__version__}") | ||
| print(f"MUSA available: {torch.musa.is_available()}") | ||
| print(f"MUSA devices: {torch.musa.device_count()}") | ||
| print(f"Platform: {current_platform}") | ||
| PY |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why we need this workflow
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to remove this workflows |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Copyright 2026 FlagOS Contributors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Ascend runners are scarce shared resources. Validate the image and selected | ||
| # cases directly on the host first, then dispatch this workflow when a recorded | ||
| # full CI result is needed. | ||
| name: Ascend Manual CI | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| types: [labeled] | ||
|
|
||
| concurrency: | ||
| group: ascend-manual-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| test-ascend: | ||
| if: >- | ||
| github.event_name == 'workflow_dispatch' || | ||
| github.event.label.name == 'run-ascend-ci' | ||
| uses: ./.github/workflows/_platform_test.yml | ||
| with: | ||
| platform: ascend | ||
| secrets: inherit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,7 +134,6 @@ jobs: | |
| platform: hygon | ||
| secrets: inherit | ||
|
|
||
| # ============================================================ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why we remove this line |
||
| # Job 4d: MetaX platform testing | ||
| # ============================================================ | ||
| test-metax: | ||
|
|
@@ -144,3 +143,14 @@ jobs: | |
| with: | ||
| platform: metax | ||
| secrets: inherit | ||
|
|
||
| # ============================================================ | ||
| # Job 4e: MUSA platform testing | ||
| # ============================================================ | ||
| test-musa: | ||
| needs: discover | ||
| if: contains(fromJson(needs.discover.outputs.platforms), 'musa') | ||
| uses: ./.github/workflows/_platform_test.yml | ||
| with: | ||
| platform: musa | ||
| secrets: inherit | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check test models