Skip to content

[CICD] Add train image pipeline and real TE-FL smoke testCi/ascend train te smoke - #1250

Open
AlexMa616 wants to merge 36 commits into
flagos-ai:mainfrom
BrianPei:ci/ascend-train-te-smoke
Open

[CICD] Add train image pipeline and real TE-FL smoke testCi/ascend train te smoke#1250
AlexMa616 wants to merge 36 commits into
flagos-ai:mainfrom
BrianPei:ci/ascend-train-te-smoke

Conversation

@AlexMa616

Copy link
Copy Markdown
Collaborator

Description

Add an Ascend training image pipeline and enable the Ascend CI suite with a
real TransformerEngine-FL training smoke test.

The change builds the training runtime from Ascend-specific Docker and installer
files, validates Megatron-LM-FL and TE-FL NPU initialization, and runs a
two-device Qwen3 0.6B smoke test through the TE-FL reference backend.

Chip-specific setup remains outside reusable common workflows. Ascend behavior
is defined through the platform configuration, Ascend installer and launcher,
Dockerfile, and dedicated image-build workflow. No FlagScale core source is
changed.

Prerequisite: TransformerEngine-FL must include 771a7488
(fix(ascend): include NPU backend in Python package) or an equivalent upstream
change before rebuilding the image from the official TE-FL repository.

Type of change

  • Infra/Build change (changes to CI/CD workflows or build scripts)
  • Bug fix
  • Code refactoring
  • New feature (non-breaking change which adds functionality)
  • Documentation change
  • Breaking change

Changes

  • Added a trusted Ascend training image build and Harbor publishing workflow.
  • Added the Ascend training Dockerfile and source dependency installation for
    Megatron-LM-FL and TransformerEngine-FL.
  • Added an Ascend launcher that restores TE-FL NPU compatibility after Megatron
    platform initialization.
  • Added a two-device Qwen3 0.6B mock-data smoke test using
    transformer_impl: transformer_engine and TE-FL reference.torch operators.
  • Added platform-neutral finite-loss smoke validation and parser tests.
  • Enabled Ascend through the standard all_tests workflow and selected the
    validated Harbor training image.
  • Aligned torchvision with the validated torch 2.7.1 and
    torch_npu 2.7.1.post2 runtime.
  • Improved installer cache path handling, resumable sccache downloads, and
    relative requirements include processing.

Validation

  • Repository-built training image smoke:
    • Completed 3 training iterations on two Ascend NPUs.
    • Dispatched TE-FL GEMM, RMSNorm forward/backward, and optimizer operations
      through reference.torch.
    • No skipped or NaN iterations.
    • 1 passed
    • FLAGSCALE_ASCEND_REPO_IMAGE=PASS
  • Validated Harbor image:
    • harbor.baai.ac.cn/flagos-dev/flagscale:manual-20260724-ascend-train-426ad116-te771a7488
    • Digest: sha256:2fe15cf8b339b6828395fc3ce56e67b004b7c5f251d9e6673f20579819fe2c16
  • GitHub Actions:
  • Local focused checks:
    • Shell, Python, YAML, and Git diff validation passed.
    • Ascend training matrix parsing passed.
    • Result parser tests: 2 passed.

Checklist

  • I have read and followed the contributing guidelines
  • The functionality is complete for the Ascend training pipeline and smoke scope
  • I have commented my code, particularly in CI workflow setup steps
  • My changes generate no new warnings
  • I have tested the training workflow on the Ascend platform

@AlexMa616
AlexMa616 requested a review from aoyulong as a code owner July 24, 2026 14:21
@CLAassistant

CLAassistant commented Jul 24, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@AlexMa616
AlexMa616 force-pushed the ci/ascend-train-te-smoke branch 2 times, most recently from be82b5a to c2a56d4 Compare July 24, 2026 14:44
@AlexMa616
AlexMa616 force-pushed the ci/ascend-train-te-smoke branch from c2a56d4 to 3d7ea91 Compare July 26, 2026 14:03

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next time we try to build a build_image_common.yml and use vendor.yml to control the build workflow

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We’ll reuse a common image-build workflow with vendor-specific configuration for future chips.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

envs:
ASCEND_VISIBLE_DEVICES: "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"
HCCL_WHITELIST_DISABLE: 1
CC: ./tools/install/ascend/triton_gxx_wrapper.sh

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wrapper serializes concurrent Triton compilation to prevent .gch file conflicts. I’ve added a comment to clarify it.


data:
# Keep the accelerator smoke test independent of runner-local .idx/.bin files.
# MockGPTDataset still exercises tokenization, forward/backward, HCCL, and the optimizer.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If use the MockGPTDataset,we can‘t verify the accuracy with golden value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced the mock dataset with the existing real dataset and added golden loss validation.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We write a test script to test another test script?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extra parser logic and its unit test have been removed.

@hooray03
hooray03 force-pushed the ci/ascend-train-te-smoke branch 2 times, most recently from 3eec7aa to 64843ae Compare August 10, 2026 07:44
@hooray03

Copy link
Copy Markdown
Contributor

Following the review suggestion, image building has been split from this PR. This PR now contains only the standard Ascend workflow and test validation using prebuilt images; it no longer changes Dockerfiles, image-build workflows, requirements, or Ascend image installers. The image-build work is preserved separately on BrianPei:ci/ascend-image-build and will be submitted after this workflow PR is merged.

@hooray03
hooray03 force-pushed the ci/ascend-train-te-smoke branch 4 times, most recently from 5abe025 to b0de48f Compare August 10, 2026 11:34

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if necessary

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if necessary

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@hooray03
hooray03 force-pushed the ci/ascend-train-te-smoke branch from b0de48f to b3072f1 Compare August 11, 2026 07:56
- data

data:
data_path: /home/gitlab-runner/data/pile_wikipedia_demo/pile_wikipedia_demo

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right data path?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed, yes.

Comment thread tools/install/ascend/install_serve.sh Outdated
# after the Ascend inference and serve matrices pass.
FLAGGEMS_REF="${FLAGSCALE_FLAGGEMS_REF:-61f3ff2773bc9c8e86b97489775ef9668a96a33c}"
VLLM_PLUGIN_REPO="${FLAGSCALE_VLLM_PLUGIN_REPO:-https://github.com/flagos-ai/vllm-plugin-FL.git}"
VLLM_PLUGIN_REF="${FLAGSCALE_VLLM_PLUGIN_REF:-43edeb601f4b8f616f56109de64836529e758deb}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we use this commit tag

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants