[CICD] Add Ascend NPU unit test support#91
Open
AlexMa616 wants to merge 12 commits into
Open
Conversation
Darryl233
reviewed
Jul 23, 2026
| display_name: 'Huawei Ascend NPU' | ||
|
|
||
| # CI image for the Ascend environment | ||
| ci_image: harbor.baai.ac.cn/transformerengine-fl/flagscale:te-fl-triton311 |
Collaborator
There was a problem hiding this comment.
Rename the ci_image in accordance with the FlagCICD container image solution
Darryl233
reviewed
Jul 23, 2026
|
|
||
| # Ascend installs the Python/plugin layer and does not need CUDA submodules | ||
| - name: Checkout Source Code on Ascend | ||
| if: inputs.platform == 'ascend' |
Collaborator
There was a problem hiding this comment.
Check if you can merge these three Checkout Source Code steps into one. Pulling source code shouldn't be a platform-related operation
Darryl233
reviewed
Jul 23, 2026
| # Coverage setup: Ascend unit jobs must always produce raw coverage. | ||
| COVERAGE_ENABLED=false | ||
| if pip3 install coverage pytest-cov --quiet 2>/dev/null; then | ||
| if [ "${{ inputs.platform }}" = "ascend" ]; then |
Collaborator
There was a problem hiding this comment.
Better preinstall dependencies in the image and reduce platform-related implementation in the workflow
2.ci: use preinstalled coverage dependencies 3.ci: update Ascend image with coverage deps
…TransformerEngine-FL into feature/ascend-unit-ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds Ascend NPU Unit CI support for TransformerEngine-FL through torch_npu and the FlagOS backend. It extends the existing CI workflow to execute real TE workloads and selected shared PyTorch tests on Ascend 910C.
Changes
Ascend NPU testing
Add real NPU coverage for:
Linear forward and backward
LayerNorm, RMSNorm, and LayerNormLinear
LayerNormMLP
GEMM, softmax, and multi-tensor operations
Unfused Dot Product Attention and MultiheadAttention
TransformerLayer debug and ONNX export paths
Reuse selected portable sanity and numerics tests from the existing PyTorch suites.
Distributed testing
Add support for:
Two-process HCCL execution
TE Linear gradient synchronization
Context Parallel utility tests
Initial non-FP8 distributed numerical validation
CI and coverage
Add Ascend-specific Unit test entry points.
Add raw and aggregated coverage collection.
Fail explicitly when torch_npu or flag_gems is unavailable.
Keep unsupported CUDA-specific features explicitly excluded.
Testing
Verified on Ascend 910C:
PyTorch Unit test execution passed.
PyTorch Debug passed.
PyTorch ONNX passed.
PyTorch Distributed is under validation.
The current PyTorch Unit job failure occurred during coverage artifact upload after the test execution had passed.
Limitations
CUDA Graphs, Flash/Fused Attention, FP8, MXFP8, NVFP4, block scaling, TensorRT integration, and Integration tests are not included in the current Ascend Unit scope.