Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
966a5b9
Changed VERSION to 2.9.0
ptrendx Oct 16, 2025
739c656
[JAX] Fix imports in test for deprecated jax.experimental.pjit (#2274)
KshitijLakhani Oct 17, 2025
c2a643d
Wheels for cuda 13 (#2278)
ksivaman Oct 18, 2025
7e72d41
[JAX] NVFP4 recipe with option to enable/disable SR, RHT, and 2D quan…
jberchtold-nvidia Oct 22, 2025
9b75db3
Include TE core headers in final build (#2291)
ksivaman Oct 23, 2025
8b9849a
Overhaul the compilation for the arch-specific features (#2279)
ptrendx Oct 23, 2025
c4c185d
[PyTorch] Add max_logit support for MuonClip (#2195)
cyanguwa Oct 25, 2025
fa71964
[PyTorch] Fix CI failures due to deterministic attention backend (#2288)
ksivaman Oct 20, 2025
fe9b150
[JAX] Fix: Skip determinism tests for bprop for all sm >=100 (#2315)
KshitijLakhani Oct 30, 2025
0acd0e7
[PyTorch] Fix attention backend and tests for `sm120` (#2320)
ksivaman Oct 30, 2025
9cc089a
[PyT] Bump the min version expected to supported FP8 current scaling …
KshitijLakhani Oct 30, 2025
70f5366
[JAX] Ensure JAX reference impl uses an accurate backend in our tests…
jberchtold-nvidia Oct 30, 2025
bae9d3a
[Version] Reset to TransformerEngine v2.9 (#5)
lxd-cumt Dec 11, 2025
e13e38a
Fix import bugs (#6)
lxd-cumt Dec 11, 2025
ef41367
Fix flash-attention fallback failures (#7)
lxd-cumt Dec 17, 2025
fd5f657
Multi-Backend Architecture Implementation for TransformerEngine-FL (#4)
lihongyang1990 Dec 29, 2025
57adff4
Add missing __init__.py files and policy test suite (#9)
lihongyang1990 Jan 4, 2026
ec8edfc
Polish readme (#11)
lxd-cumt Jan 4, 2026
b26b226
Register get_attention_backend for all backends and fix FlashAttentio…
lihongyang1990 Jan 6, 2026
a423680
fix nv shared lib bug. (#16)
lihongyang1990 Jan 7, 2026
fbe34bd
Add a new vendor implementation named hygon (#15)
Jan 12, 2026
396794e
Update the way the gems context is invoked in the FlagOS Backend (#18)
lxd-cumt Jan 12, 2026
3d80e63
Unify the usage of the gems context (#20)
lxd-cumt Jan 12, 2026
f101d2c
fix: torch SDPA backend multi-batch support (#17)
lihongyang1990 Jan 12, 2026
832a797
Remove use_gems context and call flag_gems.xxx directly (#22)
lxd-cumt Jan 13, 2026
08cabba
Add new vendor backend METAX (#21)
dinghaodhd Jan 16, 2026
03d1998
Add multi_tensor_adam_param_remainder and context parallel support (#23)
lihongyang1990 Jan 21, 2026
54390c7
Fix enum mismatch in plugins (#25)
lxd-cumt Jan 22, 2026
48c8480
add Vendor KUNLUNXIN (#27)
ssuurrffaaccee Jan 25, 2026
de00a8a
Fix the incorrect registration on Kunlunxin (#29)
lxd-cumt Jan 26, 2026
35e1809
Polish available check for kunlunxin (#30)
lxd-cumt Jan 26, 2026
8690ab4
Add new register op get_attention_backend for METAX (#31)
dinghaodhd Jan 28, 2026
b0a5934
[iluvatar]add vendor/iluvatar backend (#35)
DannyP0 Feb 5, 2026
12b2077
Fix: Resolve parameter mismatch between TE_FL and NVTE functions (#34)
lihongyang1990 Feb 10, 2026
f808816
[CICD] Add workflows to validate TE QA test cases (#41)
Darryl233 Mar 2, 2026
47e8ee7
Refactor optimizer implementations and improve multi_tensor ops (#36)
lihongyang1990 Mar 3, 2026
acced6d
tefl musa support (#42)
jiamingwang-mt Mar 11, 2026
4f54860
Add python-level patches to supporting multiple platforms (#49)
lxd-cumt Mar 23, 2026
7f788a3
Add scaled_masked_softmax_forward/backward for flagos backend (#52)
lxd-cumt Mar 25, 2026
1f98511
Fix quantizer dtype conversion errors (#54)
lxd-cumt Mar 26, 2026
2188137
apply flagos te_groups_gemm op (#55)
chai-xiaonan Mar 30, 2026
ebcfadc
[CICD] support Metax MACA workflow (#48)
qqjxzxq Apr 2, 2026
9d1c48a
[CICD] Upload unittest coverage report to FlagCICD platform && Access…
BrianPei Apr 9, 2026
d7e9e7b
[CICD] Refactor workflows, Add integration_tests, Switch to FlagCICD …
BrianPei Apr 24, 2026
38bce13
Add the new vendor backend ENFLAME (#61)
gongxijun May 12, 2026
b75e354
add kunlunxin vendor op (#66)
sunge666-ui May 13, 2026
badccf2
TE-FL Upgrade: Synchronization with TE Release V2.14 (#62)
lxd-cumt May 15, 2026
9a686fa
Fix op register errors when skip cuda (#69)
lxd-cumt May 29, 2026
3c34bb9
Support bias for generic_gemm (#70)
wenqingqian Jun 5, 2026
25e80e9
add flagos layernorm (#72)
wenqingqian Jun 10, 2026
23b5013
add multi_tensor_compute_scale_inv_e8m0 and change call erro (#74)
sunge666-ui Jun 11, 2026
b7f65d1
add new unittest (#77)
zhaoyinglia Jun 11, 2026
9aa7e20
[fix] fix plugin te_general_grouped test bug (#81)
lihongyang1990 Jun 25, 2026
5dd31d7
fix(hygon/platform): Improve Hygon library path resolution, fall back…
wangxshuai Jun 29, 2026
d62e95f
[ascend]Native Integration of MegatronAdaptor (TransformerEngine-FL M…
ltllt1 Jul 1, 2026
4f732e2
[CICD] Improve CUDA unit test coverage (#73)
qqjxzxq Jul 1, 2026
d83b4e7
Add FlagOS Triton fused RoPE kernels (#83)
lihongyang1990 Jul 9, 2026
3b5fbb5
hcu: implement multi_tensor_scale_tensor using multi_tensor_scale in …
wangxshuai Jul 13, 2026
2cb485f
feat(backend): support tsingmicro txda backend (#88)
tsingmicro-public-e Jul 23, 2026
711887e
[Ascend] Integrate transformer_engine_npu && Fix the GEMM operator bu…
Darryl233 Jul 28, 2026
5aa024d
Integrate KunLunXin TE-FL backend patches (#84)
Jonahmoon Jul 31, 2026
7ce3fce
[CICD] Add Ascend NPU unit test support (#91)
AlexMa616 Aug 4, 2026
ed37db3
[CICD] Add BW1000 reference CI baseline and standardize plugin tests …
AlexMa616 Aug 6, 2026
dea7cd6
[CICD] Add MUSA test workflow (#93)
AlexMa616 Aug 7, 2026
642108f
Stage 3 complete: Merge upstream v2.17 into main
Aug 10, 2026
c296127
Stage 4: Add 2 utils bindings to pybind.cpp
Aug 10, 2026
29c1da2
Stage 5: Patch CUDA hardcoding to TE_DEVICE_TYPE
Aug 10, 2026
a43c966
Stage 7: Fix setup.py missing InstallCommand import
Aug 10, 2026
80778da
Fix 58 residual merge conflict markers from Stage 3
Aug 10, 2026
f7b076f
Remove temporary analysis files from sync process
Aug 10, 2026
5d01bea
Stage 4: Sync plugin API with upstream v2.17 pybind changes
Aug 10, 2026
88a9532
Fix: Restore TE_DEVICE_TYPE and te_device_type() lost during merge
Aug 10, 2026
a07604f
fix: Restore te_device_type() for multi-backend support in DotProduct…
Aug 10, 2026
4f73cab
fix: Restore te_device_type() in permutation.py (partial, 10+ occurre…
Aug 10, 2026
402cc76
fix: Restore te_device_type() in triton/permutation.py and utils.py
Aug 10, 2026
45429d5
fix: Restore te_device_type() in distributed.py (9 locations)
Aug 10, 2026
9d632ed
fix: Restore te_device_type() in quantization.py (7 locations)
Aug 10, 2026
925121e
fix: Restore te_device_type() in module/base.py (3 locations)
Aug 10, 2026
09ed9b1
fix: Batch restore te_device_type() in 10 files (attention, jit, tens…
Aug 10, 2026
48e7727
fix: Replace hardcoded cuda with te_device_type() in layernorm_mlp.py
Aug 10, 2026
179930a
fix: Fix syntax error in utils.py import statement
Aug 10, 2026
2cb9180
fix: Add te_device_type() to cpu_offload.py
Aug 10, 2026
e9b40fe
fix: Add missing te_device_type() import in dot_product_attention.py
Aug 10, 2026
2bc1987
fix: Correct te_device_type() import paths to match main branch conve…
Aug 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
45 changes: 45 additions & 0 deletions .github/actions/build-pytorch-wheel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.

FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

ENV CUDA_HOME=/usr/local/cuda
ENV PATH=$PATH:$CUDA_HOME/bin
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
ENV TORCH_CUDA_ARCH_LIST="6.0;6.1;7.0;7.5;8.0;8.6;9.0"

ARG PYTHON_VERSION=3.12
ARG TORCH_VERSION=2.9.1
ARG CUDA_VERSION=12.9.1
ARG CUDNN_MAJOR_VERSION=9
ENV PATH=/opt/venv/bin:$PATH
ENV PYTHONUNBUFFERED=1
ARG AARCH=x86_64

# Install Python
RUN apt-get update && \
apt-get install -y software-properties-common wget && \
add-apt-repository ppa:deadsnakes/ppa -y && \
apt-get install -y python$PYTHON_VERSION-dev python$PYTHON_VERSION-venv python3-pip && \
python$PYTHON_VERSION -m venv /opt/venv


# Install cuda-toolkit
RUN CUDA_MAJOR_VERSION=$(echo $CUDA_VERSION | awk -F \. {'print $1'}) && \
CUDA_MINOR_VERSION=$(echo $CUDA_VERSION | awk -F \. {'print $2'}) && \
rm /etc/apt/sources.list.d/cuda*.list || true && \
rm /etc/apt/sources.list.d/nvidia-cuda.list || true && \
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/${AARCH}/cuda-keyring_1.1-1_all.deb && \
dpkg -i cuda-keyring_1.1-1_all.deb && \
rm cuda-keyring_1.1-1_all.deb && \
apt-get update && \
apt-get install -y cuda-toolkit-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} cudnn-cuda-$CUDA_MAJOR_VERSION libcudnn$CUDNN_MAJOR_VERSION-cuda-$CUDA_MAJOR_VERSION libnccl2 libnccl-dev cmake

# Install PyTorch
RUN export MATRIX_CUDA_VERSION=$(echo $CUDA_VERSION | awk -F \. {'print $1 $2'}) && \
export MATRIX_TORCH_VERSION=$(echo $TORCH_VERSION | awk -F \. {'print $1 "." $2'}) && \
export TORCH_CUDA_VERSION=$(python -c "from os import environ as env; versions = {'2.5': (118, 124), '2.6': (118, 126), '2.7': (118, 128), '2.8': (126, 129), '2.9': (126, 130)}; minv, maxv = versions[env['MATRIX_TORCH_VERSION']]; print(minv if int(env['MATRIX_CUDA_VERSION']) < 120 else maxv)") && \
pip install --no-cache-dir torch==${TORCH_VERSION} --index-url https://download.pytorch.org/whl/cu${TORCH_CUDA_VERSION}
118 changes: 118 additions & 0 deletions .github/actions/build-pytorch-wheel/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.

name: Build PyTorch Wheel
description: Builds a PyTorch wheel for TransformerEngine

inputs:
release-version:
description: 'The release version to use for the build'
required: true
python-version:
description: 'The Python version to use for the build'
required: true
cuda-version:
description: 'The CUDA version to use for the build'
required: true
cudnn-version:
description: 'The cuDNN version to use for the build'
required: true
torch-version:
description: 'The PyTorch version to use for the build'
required: true
cxx11_abi:
description: 'Enable torch flag C++11 ABI (TRUE/FALSE)'
required: true
base-image:
description: 'The base image to use for the build'
required: false
aarch:
description: 'The architecture to use for the build'
required: true
outputs:
wheel_name:
description: 'The name of the built wheel'
value: ${{ steps.build_wheel.outputs.wheel_name }}

runs:
using: 'composite'
steps:
- name: Move /var/lib/docker/
shell: bash -euxo pipefail {0}
run: sudo mv /var/lib/docker/ "${GITHUB_WORKSPACE}/docker"

- name: Maximize build space
uses: easimon/maximize-build-space@c28619d8999a147d5e09c1199f84ff6af6ad5794
with:
root-reserve-mb: 5120
temp-reserve-mb: 32
swap-size-mb: 10240
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
build-mount-path: '/var/lib/docker/'

- name: Restore /var/lib/docker/
shell: bash -euxo pipefail {0}
run: sudo sh -c "mv ${GITHUB_WORKSPACE}/docker/* /var/lib/docker"

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.release-version }}
submodules: recursive

- name: Checkout build tools
uses: actions/checkout@v4
with:
path: build-tools
submodules: recursive

- name: Build image
shell: bash -euxo pipefail {0}
env:
BASE_IMAGE: ${{ inputs.base-image }}
run: |
if [[ "${BASE_IMAGE}" == "" ]]; then
docker build \
-t transformer-engine-build \
-f build-tools/.github/actions/build-pytorch-wheel/Dockerfile \
--build-arg PYTHON_VERSION=${{ inputs.python-version }} \
--build-arg TORCH_VERSION=${{ inputs.torch-version }} \
--build-arg CUDA_VERSION=${{ inputs.cuda-version }} \
--build-arg CUDNN_MAJOR_VERSION=${{ inputs.cudnn-version }} \
--build-arg AARCH=${{ inputs.aarch }} \
.
else
docker pull ${BASE_IMAGE}
docker tag ${BASE_IMAGE} transformer-engine-build
fi
- name: Build wheel
shell: bash -euxo pipefail {0}
id: build_wheel
env:
CXX11_ABI: ${{ inputs.cxx11_abi }}
run: |
echo ::group::Build wheel

EXIT_CODE=$(docker run \
--rm \
--shm-size=64g \
--workdir /workspace/transformer_engine/pytorch \
--volume $(pwd):/workspace \
--volume $GITHUB_OUTPUT:$GITHUB_OUTPUT \
-e PIP_CONSTRAINT= \
-e CXX11_ABI=$CXX11_ABI \
-e GITHUB_OUTPUT=$GITHUB_OUTPUT \
transformer-engine-build bash /workspace/build-tools/.github/actions/build-pytorch-wheel/build.sh | tail -n 1)

# Do not fail the job if timeout killed the build
exit $EXIT_CODE
echo ::endgroup::

- name: Log Built Wheels
shell: bash -euxo pipefail {0}
run: |
ls transformer_engine/pytorch/dist
26 changes: 26 additions & 0 deletions .github/actions/build-pytorch-wheel/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.

set -eoxu pipefail

export NVTE_PYTORCH_FORCE_BUILD=TRUE
export NVTE_NO_LOCAL_VERSION=1
export NVTE_PYTORCH_FORCE_CXX11_ABI=$CXX11_ABI
export PIP_CONSTRAINT=

pip install wheel packaging nvidia-mathdx ninja pybind11

# 5h timeout since GH allows max 6h and we want some buffer
EXIT_CODE=0
timeout 5h python setup.py bdist_wheel --dist-dir=dist || EXIT_CODE=$?

if [ $EXIT_CODE -eq 0 ]; then
wheel_name=$(python -c "import setup; print(setup.get_wheel_url()[1])" | tail -n 1)
ls dist/*whl |xargs -I {} mv {} dist/${wheel_name}
echo "wheel_name=${wheel_name}" | tee -a "$GITHUB_OUTPUT"
fi

echo $EXIT_CODE
77 changes: 77 additions & 0 deletions .github/configs/ascend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Huawei Ascend NPU configuration for TransformerEngine-FL
# This file follows the same schema as cuda.yml and metax.yml.

hardware_name: ascend
display_name: 'Huawei Ascend NPU'
checkout_submodules: recursive

# CI image for the Ascend environment
ci_image: harbor.baai.ac.cn/flagos-dev/transformerengine-fl:85c2523-ascend-dev
container_pull_policy: always

# Runner labels for the self-hosted Ascend node
runner_labels:
- hw-4g-cicd-te

# Container volumes
container_volumes:
- /usr/local/Ascend/driver:/usr/local/Ascend/driver
- /usr/local/Ascend/add-ons:/usr/local/Ascend/add-ons

# Container options
container_options: >-
--privileged
--shm-size=100g
--ipc=host
--ulimit memlock=-1
--ulimit stack=67108864
--user root
--device=/dev/davinci0
--device=/dev/davinci1
--device=/dev/davinci2
--device=/dev/davinci3
--device=/dev/davinci_manager
--device=/dev/devmm_svm
--device=/dev/hisi_hdc

# Platform-specific environment setup script
setup_script: .github/scripts/setup_ascend.sh

coverage:
enabled: true
required: true
python: python3
sources:
- transformer_engine
include:
- transformer_engine/pytorch/*
- transformer_engine/debug/*
- transformer_engine/plugin/*
omit:
- '*/setup.py'
- '*/transformer_engine/plugin/core/_build_config.py'

unit_test_matrix:
- name: pytorch_debug
runner: script
path: qa/L0_pytorch_debug_unittest/test_ascend.sh

- name: pytorch_unittest
runner: script
path: qa/L0_pytorch_unittest/test_ascend.sh

- name: pytorch_distributed_unittest
runner: script
path: qa/L1_pytorch_distributed_unittest/test_ascend.sh

- name: pytorch_onnx_unittest
runner: script
path: qa/L1_pytorch_onnx_unittest/test_ascend.sh

integration_test_matrix:
- name: pytorch_mcore_integration
path: qa/L1_pytorch_mcore_integration/test.sh

# Device types to run tests on
device_types:
- ascend
92 changes: 92 additions & 0 deletions .github/configs/cuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# CUDA Hardware Configuration for TransformerEngine-FL
# Refactored for A100 Nodes
# This file defines environment variables, volumes, and test filters for TE tests.

hardware_name: cuda
display_name: 'NVIDIA CUDA (A100)'
checkout_submodules: recursive

# CI image for online env
ci_image: harbor.baai.ac.cn/flagscale/cuda12.8.1-torch2.7.1-python3.10-te2.9:20260209

# Runner labels for self-hosted A100 node
runner_labels:
- self-hosted
- Linux
- X64
- nvidia
- gpu-8

# Runner labels for online env
runner_labels:
- nv-8g-cicd-te

# Container volumes
container_volumes:
- /home/flagscale_cicd/flask/static:/workspace/report

# Container options
container_options: >-
--privileged
--gpus all
--shm-size=500g
--ipc=host
--ulimit memlock=-1
--ulimit stack=67108864
--user root

# Platform-specific environment setup script
setup_script: .github/scripts/setup_cuda.sh

# Device types to run tests on
device_types:
- a100

coverage:
enabled: true
required: false
python: /opt/miniconda3/envs/flagscale-train/bin/python3
sources:
- transformer_engine
include:
- transformer_engine/pytorch/*
- transformer_engine/debug/*
- transformer_engine/plugin/*
omit:
- '*/setup.py'
- '*/transformer_engine/plugin/core/_build_config.py'

unit_test_matrix:
- name: pytorch_debug
runner: script
path: qa/L0_pytorch_debug_unittest/test.sh
- name: pytorch_unittest
runner: script
path: qa/L0_pytorch_unittest/test.sh
- name: pytorch_distributed_unittest
runner: script
path: qa/L1_pytorch_distributed_unittest/test.sh
- name: pytorch_onnx_unittest
runner: script
path: qa/L1_pytorch_onnx_unittest/test.sh

integration_test_matrix:
- name: pytorch_mcore_integration
path: qa/L1_pytorch_mcore_integration/test.sh

# Test matrix configuration
test_matrix:
l0_pytorch:
path: 'qa/L0_pytorch_unittest/test.sh'
ignored_tests:
- test_sanity_layernorm_mlp
- test_sanity_gpt
- test_sanity_bert
- test_sanity_T5
- test_sanity_amp_and_nvfuser
- test_sanity_drop_path
- test_layernorm_mlp_accuracy
- test_grouped_linear_accuracy
- test_gpt_accuracy
- test_basic_linear
- test_layer_norm
Loading
Loading