diff --git a/.github/workflows/comfyui-quick-start.yml b/.github/workflows/comfyui-quick-start.yml index c4ebb23be..0d87f2bec 100644 --- a/.github/workflows/comfyui-quick-start.yml +++ b/.github/workflows/comfyui-quick-start.yml @@ -1,18 +1,12 @@ # ComfyUI quick start guard - project thin trigger. # -# Calls the common engine .github/workflows/quick-start-template.yml; -# this file only declares what varies per project: schedule, -# concurrency, runner, container image, upstream repo, monitored doc -# and the test entry command. The guard loop, cache I/O, state relay -# and publishing all live in the engine. See the engine's -# `workflow_call.inputs` block for the full input contract. -# -# Engine-fixed behaviours this trigger relies on (declared in the -# engine, NOT here): -# * cache key prefix: monitor-state-comfyui- (from inputs.project) -# * artifact name: comfyui-quick-start- -# * result.json is written by the engine and validated against -# schemas/result.schema.json before upload. +# Calls the common engine .github/workflows/quick-start-template.yml once per +# machine generation (A2/A3) and merges the per-machine result.json files into +# one artifact; this file only declares what varies per project: schedule, +# concurrency, runner, container image, upstream repo, monitored doc and the +# test entry command. The guard loop, cache I/O, state relay and publishing all +# live in the engine. See the engine's `workflow_call.inputs` block for the full +# input contract. # # ComfyUI note: upstream auto-detects NPU (torch_npu import + # torch.npu.is_available() -> torch.device("npu")), so the doc's server @@ -40,11 +34,11 @@ concurrency: on: schedule: - # Twice a day, 12 h apart: UTC 10:45 and 22:45 - # (Beijing +8). All quick-start guards share this cadence; the - # (hour, minute) slot is staggered across the guards so the NPU - # runners do not all fire at the same time. - - cron: '45 10,22 * * *' + # Twice a day, 12 h apart: UTC 07:00 and 19:00 (Beijing +8). + # A2 and A3 legs fire together and the A3 pool runs one job at a + # time, so the guards take 2 h windows in sequence starting at + # deepspeed 00:00 UTC; this one owns 07:00. + - cron: '0 7,19 * * *' workflow_dispatch: # PR trigger: docs/tests changes get a guard run. paths filter avoids burning # the self-hosted NPU runner on unrelated PRs. `pull_request` (not @@ -54,18 +48,19 @@ on: paths: - 'sources/comfyui/**' - 'tests/comfyui/**' + - '.github/workflows/comfyui-quick-start.yml' permissions: contents: read jobs: - comfyui-quick-start: + qs-a2: uses: ./.github/workflows/quick-start-template.yml with: - # Namespaces cache keys (monitor-state-comfyui-*), artifacts - # (comfyui-quick-start-) and the test working dir - # (tests/comfyui). + # Namespaces cache keys, artifacts and the test working dir + # (tests/comfyui) per machine generation. project: comfyui + machine_type: a2 # Self-hosted NPU runner for the test job only; the engine pins # the cache I/O jobs (restore-cache / publish-and-persist) to # GitHub-hosted ubuntu-latest. @@ -88,3 +83,36 @@ jobs: # engine. All project env prep and installs live in the test # subclass's prepare_environment hook. test_command: python -m unittest tests.comfyui.test_quick_start_ascend -v 2>&1 + + qs-a3: + uses: ./.github/workflows/quick-start-template.yml + with: + project: comfyui + machine_type: a3 + # Atlas 900 A3 (Ascend 910C) leg; same CANN line as A2. + test_runner: '["linux-aarch64-a3-800i-ascend-docs-fed-2"]' + image: swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-a3-ubuntu22.04-py3.12 + # Cache binds for the A3 pool, same layout as the other A3 jobs: + # the 4.3 GB checkpoint comes from Hugging Face Hub. + container_options: >- + --volume=/data/ci-cache/hf/comfyui:/root/.cache/huggingface + --volume=/data/ci-cache/pip:/root/.cache/pip + timeout_minutes: 120 + upstream_repo: comfyanonymous/ComfyUI + doc_url: 'https://raw.githubusercontent.com/Ascend/docs/{0}/sources/comfyui/quick_start.md' + doc_path: https://github.com/Ascend/docs/blob/main/sources/comfyui/quick_start.md + test_command: python -m unittest tests.comfyui.test_quick_start_ascend -v 2>&1 + + merge: + needs: [qs-a2, qs-a3] + if: always() + runs-on: ubuntu-latest + steps: + - name: Checkout repository (provides the merge action) + uses: actions/checkout@v6 + - name: Merge per-machine results into one artifact + uses: ./.github/actions/merge-quick-start-results + with: + project: comfyui + result_a2: ${{ needs.qs-a2.outputs.result_json }} + result_a3: ${{ needs.qs-a3.outputs.result_json }} diff --git a/.github/workflows/evalscope-quick-start.yml b/.github/workflows/evalscope-quick-start.yml index 840ff3589..5e237c8b8 100644 --- a/.github/workflows/evalscope-quick-start.yml +++ b/.github/workflows/evalscope-quick-start.yml @@ -1,6 +1,8 @@ # evalscope quick start guard - project thin trigger. # -# Calls the common engine .github/workflows/quick-start-template.yml. +# Calls the common engine .github/workflows/quick-start-template.yml once per +# machine generation (A2/A3) and merges the per-machine result.json files into +# one artifact. name: evalscope-quick-start @@ -18,11 +20,11 @@ concurrency: on: schedule: - # Twice a day, 12 h apart: UTC 04:05 and 16:05 - # (Beijing +8). All quick-start guards share this cadence; the - # (hour, minute) slot is staggered across the guards so the NPU - # runners do not all fire at the same time. - - cron: '5 4,16 * * *' + # Twice a day, 12 h apart: UTC 03:00 and 15:00 (Beijing +8). + # A2 and A3 legs fire together and the A3 pool runs one job at a + # time, so the guards take 2 h windows in sequence starting at + # deepspeed 00:00 UTC; this one owns 03:00. + - cron: '0 3,15 * * *' workflow_dispatch: # PR trigger: docs/tests changes get a guard run. paths filter avoids burning # the self-hosted NPU runner on unrelated PRs. `pull_request` (not @@ -32,18 +34,19 @@ on: paths: - 'sources/evalscope/**' - 'tests/evalscope/**' + - '.github/workflows/evalscope-quick-start.yml' permissions: contents: read jobs: - evalscope-quick-start: + qs-a2: uses: ./.github/workflows/quick-start-template.yml with: - # Namespaces cache keys (monitor-state-evalscope-*), artifacts - # (evalscope-quick-start-) and the test working dir - # (workflows/tests/evalscope). + # Namespaces cache keys, artifacts and the test working dir + # (tests/evalscope) per machine generation. project: evalscope + machine_type: a2 # Self-hosted NPU runner for the test job only; the engine pins # the cache I/O jobs (restore-cache / publish-and-persist) to # GitHub-hosted ubuntu-latest. @@ -73,3 +76,37 @@ jobs: # engine. All project env prep and installs live in the test # subclass's prepare_environment hook. test_command: python -m unittest tests.evalscope.test_quick_start_ascend -v 2>&1 + + qs-a3: + uses: ./.github/workflows/quick-start-template.yml + with: + project: evalscope + machine_type: a3 + # Atlas 900 A3 (Ascend 910C) leg; same CANN line as A2. + test_runner: '["linux-aarch64-a3-800i-ascend-docs-fed-2"]' + image: swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-a3-ubuntu22.04-py3.12 + # Cache binds for the A3 pool, same layout as the other A3 jobs: + # the model and both dataset repos come from ModelScope. + container_options: >- + --volume=/data/ci-cache/modelscope/evalscope:/root/.cache/modelscope + --volume=/data/ci-cache/pip:/root/.cache/pip + --volume=/data/ci-cache/hf/evalscope:/root/.cache/huggingface + timeout_minutes: 120 + upstream_repo: modelscope/evalscope + doc_url: 'https://raw.githubusercontent.com/Ascend/docs/{0}/sources/evalscope/quick_start.md' + doc_path: https://github.com/Ascend/docs/blob/main/sources/evalscope/quick_start.md + test_command: python -m unittest tests.evalscope.test_quick_start_ascend -v 2>&1 + + merge: + needs: [qs-a2, qs-a3] + if: always() + runs-on: ubuntu-latest + steps: + - name: Checkout repository (provides the merge action) + uses: actions/checkout@v6 + - name: Merge per-machine results into one artifact + uses: ./.github/actions/merge-quick-start-results + with: + project: evalscope + result_a2: ${{ needs.qs-a2.outputs.result_json }} + result_a3: ${{ needs.qs-a3.outputs.result_json }} diff --git a/.github/workflows/minionerec-quick-start.yml b/.github/workflows/minionerec-quick-start.yml index c8d3ed5c9..f9c81971e 100644 --- a/.github/workflows/minionerec-quick-start.yml +++ b/.github/workflows/minionerec-quick-start.yml @@ -1,20 +1,16 @@ # MiniOneRec quick start guard - project thin trigger. # -# Calls the common engine .github/workflows/quick-start-template.yml; this -# file only declares what varies per project: schedule, concurrency, runner, -# container image, upstream repo, the pinned ref, the monitored doc and the -# test entry command. The guard loop, cache I/O, state relay and publishing -# all live in the engine - see its `workflow_call.inputs` block for the full -# contract. -# -# Cache keys (quick-start-monitor-state-minionerec_*) and artifact names -# (minionerec-quick-start-) are derived from project=minionerec. +# Calls the common engine .github/workflows/quick-start-template.yml once per +# machine generation (A2/A3) and merges the per-machine result.json files into +# one artifact; this file only declares what varies per project: schedule, +# concurrency, runner, container image, upstream repo, the pinned ref, the +# monitored doc and the test entry command. # # Upstream shape: MiniOneRec is research code on `main`, no release tags, so # fixed_ref=main - the engine resolves it to the branch tip SHA on every run, # which is also the monitor's change key. # -# Scope: single card (910B), three stages on one 0.5B model - SFT (one epoch, +# Scope: single card, three stages on one 0.5B model - SFT (one epoch, # sample=600 per sub-dataset), constrained-decoding evaluation (CC must be 0) # and one GRPO epoch. Upstream PR #85 ships `npu_support.py` and imports it # first in every entry script, so no injection or source edit is needed: @@ -37,11 +33,11 @@ concurrency: on: schedule: - # Twice a day, 12 h apart: UTC 11:50 and 23:50 - # (Beijing +8). All quick-start guards share this cadence; the - # (hour, minute) slot is staggered across the guards so the NPU - # runners do not all fire at the same time. - - cron: '50 11,23 * * *' + # Twice a day, 12 h apart: UTC 09:00 and 21:00 (Beijing +8). + # A2 and A3 legs fire together and the A3 pool runs one job at a + # time, so the guards take 2 h windows in sequence starting at + # deepspeed 00:00 UTC; this one owns 09:00. + - cron: '0 9,21 * * *' workflow_dispatch: # PR trigger: docs/tests changes get a guard run before merge. paths filter # avoids burning the self-hosted NPU runner on unrelated PRs. @@ -58,14 +54,15 @@ permissions: contents: read jobs: - minionerec-quick-start: + qs-a2: uses: ./.github/workflows/quick-start-template.yml with: - # Namespaces cache keys (quick-start-monitor-state-minionerec_*), - # artifacts (minionerec-quick-start-) and the test working dir. + # Namespaces cache keys, artifacts and the test working dir + # (tests/minionerec) per machine generation. project: minionerec - # Self-hosted NPU runner for the test job only; the engine pins the - # cache I/O jobs (restore-cache / publish-and-persist) to + machine_type: a2 + # Self-hosted NPU runner for the test job only; the engine pins + # the cache I/O jobs (restore-cache / publish-and-persist) to # GitHub-hosted ubuntu-latest. The quick start is single-card # (ASCEND_RT_VISIBLE_DEVICES=0). test_runner: '["linux-aarch64-a2-1"]' @@ -84,9 +81,41 @@ jobs: # lands on Ascend/docs post-merge. doc_url: 'https://raw.githubusercontent.com/Ascend/docs/{0}/sources/minionerec/quick_start.md' doc_path: https://github.com/Ascend/docs/blob/main/sources/minionerec/quick_start.md - # cwd is the repo root inside the `workflows` checkout (matches the - # engine template's `working-directory: workflows`); env contract + # cwd is the repo root inside the checkout; env contract # (MONITORED_DOC_URL / UPSTREAM_REF / NPU_READY) is injected by the # engine. The test subclass pins cwd to /root/minionerec-test and # sources CANN; every business step is in the doc. test_command: python -m unittest tests.minionerec.test_quick_start_ascend -v 2>&1 + + qs-a3: + uses: ./.github/workflows/quick-start-template.yml + with: + project: minionerec + machine_type: a3 + # Atlas 900 A3 (Ascend 910C) leg; same CANN line as A2. + test_runner: '["linux-aarch64-a3-800i-ascend-docs-fed-2"]' + image: swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-a3-ubuntu22.04-py3.12 + # Cache bind for the A3 pool, same layout as the other A3 jobs: + # the base model comes from Hugging Face Hub. + container_options: >- + --volume=/data/ci-cache/hf/minionerec:/root/.cache/huggingface + timeout_minutes: 120 + upstream_repo: AkaliKong/MiniOneRec + fixed_ref: main + doc_url: 'https://raw.githubusercontent.com/Ascend/docs/{0}/sources/minionerec/quick_start.md' + doc_path: https://github.com/Ascend/docs/blob/main/sources/minionerec/quick_start.md + test_command: python -m unittest tests.minionerec.test_quick_start_ascend -v 2>&1 + + merge: + needs: [qs-a2, qs-a3] + if: always() + runs-on: ubuntu-latest + steps: + - name: Checkout repository (provides the merge action) + uses: actions/checkout@v6 + - name: Merge per-machine results into one artifact + uses: ./.github/actions/merge-quick-start-results + with: + project: minionerec + result_a2: ${{ needs.qs-a2.outputs.result_json }} + result_a3: ${{ needs.qs-a3.outputs.result_json }} diff --git a/.github/workflows/modelscope-quick-start.yml b/.github/workflows/modelscope-quick-start.yml index 8a2b8d7fb..23f1aac21 100644 --- a/.github/workflows/modelscope-quick-start.yml +++ b/.github/workflows/modelscope-quick-start.yml @@ -1,18 +1,12 @@ # ModelScope quick start guard - project thin trigger. # -# Calls the common engine .github/workflows/quick-start-template.yml; -# this file only declares what varies per project: schedule, -# concurrency, runner, container image, upstream repo, monitored doc -# and the test entry command. The guard loop, cache I/O, state relay -# and publishing all live in the engine. See the engine's -# `workflow_call.inputs` block for the full input contract. -# -# Engine-fixed behaviours this trigger relies on (declared in the -# engine, NOT here): -# * cache key prefix: monitor-state-modelscope- (from inputs.project) -# * artifact name: modelscope-quick-start- -# * result.json is written by the engine and validated against -# schemas/result.schema.json before upload. +# Calls the common engine .github/workflows/quick-start-template.yml once per +# machine generation (A2/A3) and merges the per-machine result.json files into +# one artifact; this file only declares what varies per project: schedule, +# concurrency, runner, container image, upstream repo, monitored doc and the +# test entry command. The guard loop, cache I/O, state relay and publishing all +# live in the engine. See the engine's `workflow_call.inputs` block for the full +# input contract. # # ModelScope note: the doc exercises the hub client itself - source # install at the latest release tag + `modelscope download` + @@ -40,11 +34,11 @@ concurrency: on: schedule: - # Twice a day, 12 h apart: UTC 07:55 and 19:55 - # (Beijing +8). All quick-start guards share this cadence; the - # (hour, minute) slot is staggered across the guards so the NPU - # runners do not all fire at the same time. - - cron: '55 7,19 * * *' + # Twice a day, 12 h apart: UTC 05:00 and 17:00 (Beijing +8). + # A2 and A3 legs fire together and the A3 pool runs one job at a + # time, so the guards take 2 h windows in sequence starting at + # deepspeed 00:00 UTC; this one owns 05:00. + - cron: '0 5,17 * * *' workflow_dispatch: # PR trigger: docs/tests changes get a guard run. paths filter avoids burning # the self-hosted NPU runner on unrelated PRs. `pull_request` (not @@ -54,18 +48,19 @@ on: paths: - 'sources/modelscope/**' - 'tests/modelscope/**' + - '.github/workflows/modelscope-quick-start.yml' permissions: contents: read jobs: - modelscope-quick-start: + qs-a2: uses: ./.github/workflows/quick-start-template.yml with: - # Namespaces cache keys (monitor-state-modelscope-*), artifacts - # (modelscope-quick-start-) and the test working dir - # (tests/modelscope). + # Namespaces cache keys, artifacts and the test working dir + # (tests/modelscope) per machine generation. project: modelscope + machine_type: a2 # Self-hosted NPU runner for the test job only; the engine pins # the cache I/O jobs (restore-cache / publish-and-persist) to # GitHub-hosted ubuntu-latest. @@ -92,3 +87,34 @@ jobs: # engine. All project env prep and installs live in the test # subclass's prepare_environment hook. test_command: python -m unittest tests.modelscope.test_quick_start_ascend -v 2>&1 + + qs-a3: + uses: ./.github/workflows/quick-start-template.yml + with: + project: modelscope + machine_type: a3 + # Atlas 900 A3 (Ascend 910C) leg; same CANN line as A2. + test_runner: '["linux-aarch64-a3-800i-ascend-docs-fed-2"]' + image: swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-a3-ubuntu22.04-py3.12 + # Cache bind for the A3 pool, same layout as the other A3 jobs. + container_options: >- + --volume=/data/ci-cache/modelscope/modelscope:/root/.cache/modelscope + timeout_minutes: 120 + upstream_repo: modelscope/modelscope + doc_url: 'https://raw.githubusercontent.com/Ascend/docs/{0}/sources/modelscope/quick_start.md' + doc_path: https://github.com/Ascend/docs/blob/main/sources/modelscope/quick_start.md + test_command: python -m unittest tests.modelscope.test_quick_start_ascend -v 2>&1 + + merge: + needs: [qs-a2, qs-a3] + if: always() + runs-on: ubuntu-latest + steps: + - name: Checkout repository (provides the merge action) + uses: actions/checkout@v6 + - name: Merge per-machine results into one artifact + uses: ./.github/actions/merge-quick-start-results + with: + project: modelscope + result_a2: ${{ needs.qs-a2.outputs.result_json }} + result_a3: ${{ needs.qs-a3.outputs.result_json }} diff --git a/sources/comfyui/quick_start.md b/sources/comfyui/quick_start.md index 26e097f68..7e66149ae 100644 --- a/sources/comfyui/quick_start.md +++ b/sources/comfyui/quick_start.md @@ -8,7 +8,7 @@ ComfyUI 原生支持昇腾 NPU:检测到 `torch_npu` 且 `torch.npu.is_availab #### 硬件 -Atlas 900 A2 单卡(Ascend NPU),并按需完成物理机或容器内的设备挂载。 +Atlas 900 A2 / 900 A3 单卡(Ascend 910B / 910C),并按需完成物理机或容器内的设备挂载。 #### 基础软件 @@ -28,7 +28,7 @@ source /usr/local/Ascend/ascend-toolkit/set_env.sh **配套机器**: -- **机器类型**:Atlas 900 A2 单卡 +- **机器类型**:Atlas 900 A2 或 900 A3 单卡 - **操作系统**:Ubuntu 22.04 **软件版本**: @@ -65,11 +65,11 @@ python -c "import torch, torch_npu; print('torch=', torch.__version__); print('t 输出结果如下: -```shell #test-result id="check-torch" +```shell #test-result id="check-torch" fuzzy='xxx' torch= 2.9.0+cpu torch_npu= 2.9.0.post2 is_available: True -count: 1 +count: xxx ``` ```{admonition} Note diff --git a/sources/evalscope/quick_start.md b/sources/evalscope/quick_start.md index a36371edb..e0452da6f 100644 --- a/sources/evalscope/quick_start.md +++ b/sources/evalscope/quick_start.md @@ -8,7 +8,7 @@ ### 硬件 -Atlas **800T** / **900 A2** 训练系列(Ascend **910B**)。本文示例为**单卡**。 +Atlas **800T** / **900 A2** / **900 A3** 训练系列(Ascend **910B** / **910C**)。本文示例为**单卡**。 ### 软件 @@ -19,7 +19,7 @@ Atlas **800T** / **900 A2** 训练系列(Ascend **910B**)。本文示例为* | PyTorch | `torch==2.9.0` 与 `torch_npu==2.9.0.post2`,见下文安装 | | 模型 / 数据 | ModelScope 上的 Qwen2.5-0.5B-Instruct 与评测数据集 | -本文验证镜像:`swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-910b-ubuntu22.04-py3.12`。 +本文验证镜像:A2 为 `swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-910b-ubuntu22.04-py3.12`,A3 为 `swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-a3-ubuntu22.04-py3.12`。 ## 1. 加载 CANN 环境 @@ -65,7 +65,7 @@ print('count:', torch.npu.device_count()) torch= 2.9.0+cpu torch_npu= 2.9.0.post2 is_available: True -count: 1 +count: xxx ``` ```{admonition} Note @@ -200,7 +200,7 @@ evalscope eval \ 输出结果如下(评测日志较长,此处仅展示关键片段): ```shell #test-result id="run-eval" fuzzy='...' -...Qwen2.5-0.5B-Instruct... +...Finished evaluation for ... on ['gsm8k', 'arc']... ``` ## 6. 查看评测结果 diff --git a/sources/minionerec/quick_start.md b/sources/minionerec/quick_start.md index 7f206dce5..e59756b88 100644 --- a/sources/minionerec/quick_start.md +++ b/sources/minionerec/quick_start.md @@ -6,7 +6,7 @@ ### 硬件 -Atlas **800T** / **900 A2** 训练系列,芯片为 Ascend **910B**,需支持 bf16。本文示例为单卡。 +Atlas **800T** / **900 A2** / **900 A3** 训练系列,芯片为 Ascend **910B** / **910C**,需支持 bf16。本文示例为单卡。 ### 软件 @@ -21,8 +21,9 @@ Atlas **800T** / **900 A2** 训练系列,芯片为 Ascend **910B**,需支持 | 项目 | 内容 | | --- | --- | -| 机器 | Atlas 900 A2,Ascend 910B,单卡 | -| 镜像 | `swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-910b-ubuntu22.04-py3.12` | +| 机器 | Atlas 900 A2(Ascend 910B)或 Atlas 900 A3(Ascend 910C),单卡 | +| 镜像(A2) | `swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-910b-ubuntu22.04-py3.12` | +| 镜像(A3) | `swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-a3-ubuntu22.04-py3.12` | | CANN | 9.1.0 | | Python | 3.12 | | torch / torch_npu | 2.9.0 / 2.9.0.post2 | diff --git a/sources/modelscope/quick_start.md b/sources/modelscope/quick_start.md index 5967da7d3..11881116d 100644 --- a/sources/modelscope/quick_start.md +++ b/sources/modelscope/quick_start.md @@ -20,12 +20,13 @@ Atlas 900 A2 / A3 训练系列产品(Ascend 910B4 / 910B 等),并按需完 **配套机器**: -- **机器类型**:Atlas 900 A2 PODc(Ascend 910B4,64 GB × 1) +- **机器类型**:Atlas 900 A2 PODc(Ascend 910B4,64 GB × 1)或 Atlas 900 A3(Ascend 910C) - **操作系统**:Ubuntu 22.04 **配套镜像**: -swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-910b-ubuntu22.04-py3.12 +- A2:swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-910b-ubuntu22.04-py3.12 +- A3:swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-a3-ubuntu22.04-py3.12 **软件版本**: @@ -86,11 +87,11 @@ python -c "import torch, torch_npu; print('torch=', torch.__version__); print('t 输出结果如下: -```shell #test-result id="check-torch" +```shell #test-result id="check-torch" fuzzy='xxx' torch= 2.9.0+cpu torch_npu= 2.9.0.post2 is_available: True -count: 1 +count: xxx ``` ```{admonition} Note diff --git a/tests/comfyui/test_quick_start_ascend.py b/tests/comfyui/test_quick_start_ascend.py index da65e559f..35e5607a1 100644 --- a/tests/comfyui/test_quick_start_ascend.py +++ b/tests/comfyui/test_quick_start_ascend.py @@ -137,6 +137,9 @@ def prepare_environment(cls) -> None: ascend dual-source). Everything else installs in document order via the ``#test`` machinery. """ + # Keep one visible card: the A3 runner exposes two. + os.environ.setdefault('ASCEND_RT_VISIBLE_DEVICES', '0') + # 0) CANN env: source set_env.sh and merge the env stream into # os.environ if os.path.isfile(cls._CANN_SET_ENV): diff --git a/tests/minionerec/test_quick_start_ascend.py b/tests/minionerec/test_quick_start_ascend.py index 005eeebd6..98eada34e 100644 --- a/tests/minionerec/test_quick_start_ascend.py +++ b/tests/minionerec/test_quick_start_ascend.py @@ -99,6 +99,9 @@ def prepare_environment(cls) -> None: install, the shim, the model and data download, SFT, evaluation and RL are the steps a reader follows. """ + # Keep one visible card: the A3 runner exposes two. + os.environ.setdefault('ASCEND_RT_VISIBLE_DEVICES', '0') + # 0) PATH: /usr/local/sbin for npu-smi. current_path = os.environ.get('PATH', '') prefix_dirs = '/usr/local/sbin:/usr/local/bin' diff --git a/tests/modelscope/test_quick_start_ascend.py b/tests/modelscope/test_quick_start_ascend.py index f07b70f54..5f6ffe143 100644 --- a/tests/modelscope/test_quick_start_ascend.py +++ b/tests/modelscope/test_quick_start_ascend.py @@ -214,9 +214,8 @@ def prepare_environment(cls) -> None: check=True, ) - # 4) Single-card determinism: the doc's check-torch block asserts - # ``count: 1``; pinning the visible device keeps that assertion - # true even if the cluster assigns a multi-card container. + # 4) Single-card determinism: keep the visible card at 0 even when + # the cluster assigns a multi-card container. os.environ.setdefault('ASCEND_RT_VISIBLE_DEVICES', '0') # 5) safetensors: native loader used by the cache validation