Skip to content

[ascend]Native Integration of MegatronAdaptor (TransformerEngine-FL Module) on FlagOS#79

Merged
zhaoyinglia merged 7 commits into
flagos-ai:mainfrom
ltllt1:main
Jul 1, 2026
Merged

[ascend]Native Integration of MegatronAdaptor (TransformerEngine-FL Module) on FlagOS#79
zhaoyinglia merged 7 commits into
flagos-ai:mainfrom
ltllt1:main

Conversation

@ltllt1

@ltllt1 ltllt1 commented Jun 17, 2026

Copy link
Copy Markdown

Description

This PR optimizes the training entry of FlagScale, enabling native NPU training capability without introducing MegatronAdaptor dependencies.
1、Retain complete distributed training ability on NPU
2、No breaking changes to existing FlagScale training workflows
Fixes # (issue)

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Change A
  • Change B

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@CLAassistant

CLAassistant commented Jun 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@lxd-cumt lxd-cumt left a comment

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.

LGTM

from collections.abc import Callable

import torch
import torch_npu

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.

add try-catch

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. I've added try-catch blocks for module imports as suggested. Please review the updated code.

@lxd-cumt

Copy link
Copy Markdown
Collaborator

please run pre-commit to pass format_check ci

@ltllt1

ltllt1 commented Jun 29, 2026

Copy link
Copy Markdown
Author

Thanks for the reminder. I've run pre-commit locally and passed the format check, screenshot attached for reference.
ScreenShot_2026-06-29_152952_202

@zhaoyinglia zhaoyinglia merged commit d62e95f into flagos-ai:main Jul 1, 2026
26 of 27 checks passed
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.

4 participants