Skip to content

Commit 71da32d

Browse files
zhzhcookiesgjzfzzfi3wanna2sunnycase
authored
[Release] Update flagtree version to v0.4.0, and add release notes (#276)
* [REPORT] Add release notes v0.4.0 * add content of tle-raw Signed-off-by: Jinjie Liu <jjliu@baai.ac.cn> * [REPORT] Update release notes v0.4.0 CN for hints * Update release notes for Triton Language Extensions * update further work for hints and tle-raw * [REPORT] Update release notes v0.4.0 CN * Add plans for TLE-Lite and TLE-Struct enhancements * [DOC] Update readme for hints, tle wiki * [DOC] Update readme for flagos * [DOC] Update release notes en * [Version] Update to v0.4.0 --------- Signed-off-by: Jinjie Liu <jjliu@baai.ac.cn> Co-authored-by: Jinjie Liu <jjliu@baai.ac.cn> Co-authored-by: i3wanna2 <15910307812@163.com> Co-authored-by: sunnycase <sunnycase@live.cn>
1 parent 9ba2a64 commit 71da32d

7 files changed

Lines changed: 163 additions & 24 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
## <img width="30" height="30" alt="FlagTree-GitHub" src="https://github.com/user-attachments/assets/d8d24c81-6f46-4adc-94e2-b89b03afcb43" /> FlagTree
44

5-
FlagTree is an open source, unified compiler for multiple AI chips project dedicated to developing a diverse ecosystem of AI chip compilers and related tooling platforms, thereby fostering and strengthening the upstream and downstream Triton ecosystem. Currently in its initial phase, the project aims to maintain compatibility with existing adaptation solutions while unifying the codebase to rapidly implement single-repository multi-backend support. For upstream model users, it provides unified compilation capabilities across multiple backends; for downstream chip manufacturers, it offers examples of Triton ecosystem integration. <br>
5+
FlagTree is part of [FlagOS](https://flagos.io/), a unified, open-source AI system software stack that aims to foster an open technology ecosystem by seamlessly integrating various models, systems and chips.
6+
By "develop once, migrate across various chips", FlagOS aims to unlock the full computational potential of hardware, break down the barriers between different chip software stacks, and effectively reduce migration costs. <br>
7+
FlagTree is an open source, unified compiler for multiple AI chips project dedicated to developing a diverse ecosystem of AI chip compilers and related tooling platforms, thereby fostering and strengthening the upstream and downstream Triton ecosystem.
8+
Currently in its initial phase, the project aims to maintain compatibility with existing adaptation solutions while unifying the codebase to rapidly implement single-repository multi-backend support.
9+
For upstream model users, it provides unified compilation capabilities across multiple backends; for downstream chip manufacturers, it offers examples of Triton ecosystem integration. <br>
610
Each backend is based on different versions of triton, and therefore resides in different protected branches. All these protected branches have equal status.
711

812
|Branch|Vendor|Backend|Triton version|
9-
|------|------|-------|--------------|
13+
|:-----|:-----|:------|:-------------|
1014
|[main](https://github.com/flagos-ai/flagtree/tree/main)|NVIDIA<br>AMD<br>x86_64 cpu<br>ILUVATAR(天数智芯)<br>Moore Threads(摩尔线程)<br>KLX<br>MetaX(沐曦股份)<br>HYGON(海光信息)|[nvidia](/third_party/nvidia/)<br>[amd](/third_party/amd/)<br>[triton-shared](https://github.com/microsoft/triton-shared)<br>[iluvatar](/third_party/iluvatar/)<br>[mthreads](/third_party/mthreads/)<br>[xpu](/third_party/xpu/)<br>[metax](/third_party/metax/)<br>[hcu](third_party/hcu/)|3.1<br>3.1<br>3.1<br>3.1<br>3.1<br>3.0<br>3.1<br>3.0|
1115
|[triton_v3.2.x](https://github.com/flagos-ai/flagtree/tree/triton_v3.2.x)|NVIDIA<br>AMD<br>Huawei Ascend(华为昇腾)<br>Cambricon(寒武纪)|[nvidia](https://github.com/FlagTree/flagtree/tree/triton_v3.2.x/third_party/nvidia/)<br>[amd](https://github.com/FlagTree/flagtree/tree/triton_v3.2.x/third_party/amd/)<br>[ascend](https://github.com/FlagTree/flagtree/blob/triton_v3.2.x/third_party/ascend)<br>[cambricon](https://github.com/FlagTree/flagtree/tree/triton_v3.2.x/third_party/cambricon/)|3.2|
1216
|[triton_v3.3.x](https://github.com/flagos-ai/flagtree/tree/triton_v3.3.x)|NVIDIA<br>AMD<br>x86_64 cpu<br>ARM China<br>Tsingmicro(清微智能)<br>Enflame(燧原)|[nvidia](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/nvidia/)<br>[amd](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/amd/)<br>[triton-shared](https://github.com/microsoft/triton-shared)<br>[aipu](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/aipu/)<br>[tsingmicro](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/tsingmicro/)<br>[enflame](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/enflame/)|3.3|
@@ -15,6 +19,7 @@ Each backend is based on different versions of triton, and therefore resides in
1519

1620
## Latest News
1721

22+
* 2026/01/08 Add wiki pages for new features [HINTS](https://github.com/flagos-ai/FlagTree/wiki/HINTS), [TLE](https://github.com/flagos-ai/FlagTree/wiki/TLE), [TLE-Raw](https://github.com/flagos-ai/FlagTree/wiki/EDSL).
1823
* 2025/12/24 Support pull and install [Wheel](/README.md#non-source-installation).
1924
* 2025/12/08 Added [enflame](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/enflame/) backend integration (based on Triton 3.3), and added CI/CD.
2025
* 2025/11/26 Add FlagTree_Backend_Specialization Unified Design Document [FlagTree_Backend_Specialization](/documents/decoupling/).

README_cn.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
## <img width="30" height="30" alt="FlagTree-GitHub" src="https://github.com/user-attachments/assets/d8d24c81-6f46-4adc-94e2-b89b03afcb43" /> FlagTree
44

5-
FlagTree 是面向多种 AI 芯片的开源、统一编译器。FlagTree 致力于打造多元 AI 芯片编译器及相关工具平台,发展和壮大 Triton 上下游生态。项目当前处于初期,目标是兼容现有适配方案,统一代码仓库,快速实现单仓库多后端支持。对于上游模型用户,提供多后端的统一编译能力;对于下游芯片厂商,提供 Triton 生态接入范例。<br>
5+
FlagTree 是 [FlagOS](https://flagos.io/) 的一部分,而 FlagOS 是一个统一的开源 AI 系统软件堆栈,通过无缝集成各种模型、系统和芯片技术,打造一个开放的技术生态系统。
6+
通过实现 “一次开发、跨多种芯片迁移”,FlagOS 力图充分释放硬件的计算潜能,破除不同芯片软件堆栈之间的壁垒,进而有效降低解决方案的迁移开销。<br>
7+
FlagTree 是面向多种 AI 芯片的开源、统一编译器,致力于打造多元 AI 芯片编译器及相关工具平台,发展和壮大 Triton 上下游生态。
8+
项目当前处于初期,目标是兼容现有适配方案,统一代码仓库,快速实现单仓库多后端支持。
9+
对于上游模型用户,提供多后端的统一编译能力;对于下游芯片厂商,提供 Triton 生态接入范例。<br>
610
各后端基于不同版本的 triton 适配,因此位于不同的主干分支,各主干分支均为保护分支且地位相等:<br>
711

812
|主干分支|厂商|后端|Triton 版本|
9-
|-------|---|---|-----------|
13+
|:------|:--|:--|:----------|
1014
|[main](https://github.com/flagos-ai/flagtree/tree/main)|NVIDIA<br>AMD<br>x86_64 cpu<br>ILUVATAR(天数智芯)<br>Moore Threads(摩尔线程)<br>KLX<br>MetaX(沐曦股份)<br>HYGON(海光信息)|[nvidia](/third_party/nvidia/)<br>[amd](/third_party/amd/)<br>[triton-shared](https://github.com/microsoft/triton-shared)<br>[iluvatar](/third_party/iluvatar/)<br>[mthreads](/third_party/mthreads/)<br>[xpu](/third_party/xpu/)<br>[metax](/third_party/metax/)<br>[hcu](third_party/hcu/)|3.1<br>3.1<br>3.1<br>3.1<br>3.1<br>3.0<br>3.1<br>3.0|
1115
|[triton_v3.2.x](https://github.com/flagos-ai/flagtree/tree/triton_v3.2.x)|NVIDIA<br>AMD<br>Huawei Ascend(华为昇腾)<br>Cambricon(寒武纪)|[nvidia](https://github.com/FlagTree/flagtree/tree/triton_v3.2.x/third_party/nvidia/)<br>[amd](https://github.com/FlagTree/flagtree/tree/triton_v3.2.x/third_party/amd/)<br>[ascend](https://github.com/FlagTree/flagtree/blob/triton_v3.2.x/third_party/ascend)<br>[cambricon](https://github.com/FlagTree/flagtree/tree/triton_v3.2.x/third_party/cambricon/)|3.2|
1216
|[triton_v3.3.x](https://github.com/flagos-ai/flagtree/tree/triton_v3.3.x)|NVIDIA<br>AMD<br>x86_64 cpu<br>ARM China<br>Tsingmicro(清微智能)<br>Enflame(燧原)|[nvidia](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/nvidia/)<br>[amd](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/amd/)<br>[triton-shared](https://github.com/microsoft/triton-shared)<br>[aipu](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/aipu/)<br>[tsingmicro](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/tsingmicro/)<br>[enflame](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/enflame/)|3.3|
@@ -15,6 +19,7 @@ FlagTree 是面向多种 AI 芯片的开源、统一编译器。FlagTree 致力
1519

1620
## 新特性
1721

22+
* 2026/01/08 添加 [HINTS](https://github.com/flagos-ai/FlagTree/wiki/HINTS)[TLE](https://github.com/flagos-ai/FlagTree/wiki/TLE)[TLE-Raw](https://github.com/flagos-ai/FlagTree/wiki/EDSL) 等新功能 WIKI。
1823
* 2025/12/24 支持拉取和安装 [Wheel](/README_cn.md#非源码安装)
1924
* 2025/12/08 新增接入 [enflame](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/enflame/) 后端(对应 Triton 3.3),加入 CI/CD。
2025
* 2025/11/26 添加 FlagTree 后端特化统一设计文档 [FlagTree_Backend_Specialization](/documents/decoupling/)

documents/decoupling/FlagTree_Backend_Specialization_Python.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def matmul_kernel(grid, a, b, c, M, N, K, ...):
139139

140140
#### 4.3.1 第一步:调用统一特化
141141

142-
自动遍历后端定义在 core_ext_spec_func_list 列表中的方法,加入到本模块(tl.core)。当然,也可以按需加入到其他模块(例如 tl)。注意对于 semantic.py 方法名需加上 ext_semantic_ 前缀,与 core.py 的重名函数区分开。
142+
自动遍历后端定义在 core_ext_spec_api_list 列表中的方法,加入到本模块(tl.core)。当然,也可以按需加入到其他模块(例如 tl)。注意对于 semantic.py 方法名需加上 ext_semantic_ 前缀,与 core.py 的重名函数区分开。
143143

144144
- python/triton/language/core.py
145145
```python
@@ -148,13 +148,13 @@ def spec_core_func(spec):
148148
current_module_name = __name__
149149
parent_module_name = '.'.join(current_module_name.split('.')[:-1])
150150

151-
for spec_func_name in spec.core_ext_spec_func_list:
152-
if hasattr(spec, spec_func_name):
153-
spec_func = getattr(spec, spec_func_name)
151+
for spec_api_name in spec.core_ext_spec_api_list:
152+
if hasattr(spec, spec_api_name):
153+
spec_api = getattr(spec, spec_api_name)
154154
# triton.language
155-
setattr(sys.modules[parent_module_name], spec_func.__name__, spec_func)
155+
setattr(sys.modules[parent_module_name], spec_api.__name__, spec_api)
156156
# triton.language.core
157-
setattr(sys.modules[__name__], spec_func.__name__, spec_func)
157+
setattr(sys.modules[__name__], spec_api.__name__, spec_api)
158158
```
159159

160160
#### 4.3.2 第二步:注册后端入口
@@ -183,7 +183,7 @@ class NPUDriver(DriverBase):
183183
```python
184184
from .triton.language.semantic import *
185185
__all__ = [
186-
"core_ext_spec_func_list",
186+
"core_ext_spec_api_list",
187187
]
188188
```
189189

@@ -196,7 +196,7 @@ __all__ = [
196196
def gather(src, index, axis, _builder=None):
197197
...
198198

199-
core_ext_spec_func_list = [
199+
core_ext_spec_api_list = [
200200
"gather", ...
201201
]
202202
```
@@ -213,19 +213,19 @@ def spec_math_func(spec):
213213
current_module_name = __name__
214214
parent_module_name = '.'.join(current_module_name.split('.')[:-1])
215215

216-
for spec_func_name in spec.math_ext_base_func_list:
217-
if hasattr(spec, spec_func_name):
218-
spec_func = getattr(spec, spec_func_name)
216+
for spec_api_name in spec.math_ext_base_api_list:
217+
if hasattr(spec, spec_api_name):
218+
spec_api = getattr(spec, spec_api_name)
219219
# triton.language
220-
setattr(sys.modules[parent_module_name], spec_func.__name__, spec_func)
220+
setattr(sys.modules[parent_module_name], spec_api.__name__, spec_api)
221221
# triton.language.math
222-
setattr(sys.modules[__name__], spec_func.__name__, spec_func)
222+
setattr(sys.modules[__name__], spec_api.__name__, spec_api)
223223

224-
for spec_func_name in spec.math_ext_spec_func_list:
225-
if hasattr(spec, spec_func_name):
226-
spec_func = getattr(spec, spec_func_name)
224+
for spec_api_name in spec.math_ext_spec_api_list:
225+
if hasattr(spec, spec_api_name):
226+
spec_api = getattr(spec, spec_api_name)
227227
# triton.language.math
228-
setattr(sys.modules[__name__], spec_func.__name__, spec_func)
228+
setattr(sys.modules[__name__], spec_api.__name__, spec_api)
229229
```
230230

231231
#### 4.4.2 第二步:注册后端入口
@@ -250,10 +250,10 @@ class NPUDriver(DriverBase):
250250
```python
251251
import triton.language as language
252252
exp = language.extra.ascend.libdevice.exp
253-
math_ext_base_func_list = [
253+
math_ext_base_api_list = [
254254
"exp", ... # tl.math 原有方法,但实现有特化,例如支持的 dtype 不同
255255
]
256-
math_ext_spec_func_list = [
256+
math_ext_spec_api_list = [
257257
"isnan", ... # 后端向 tl.math 新增的方法
258258
]
259259
```

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ def get_install_requires():
638638

639639
setup(
640640
name=os.environ.get("FLAGTREE_WHEEL_NAME", "flagtree"),
641-
version="0.3.0" + os.environ.get("FLAGTREE_WHEEL_VERSION_SUFFIX", ""),
641+
version="0.4.0" + os.environ.get("FLAGTREE_WHEEL_VERSION_SUFFIX", ""),
642642
author="FlagOS",
643643
author_email="contact@flagos.io",
644644
description=
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<div align="right"><a href="./release_notes_v0.4.0_cn.md">中文版</a></div>
2+
3+
## FlagTree 0.4.0 Release
4+
5+
### Highlights
6+
7+
FlagTree inherits capabilities from the previous version, continuously integrates new backends, and strengthens the ecosystem. Building upon the foundation of creating a collaborative code-building platform and achieving single-repository multi-backend support, the project continues to develop unified backend specialization design, continues to build intermediate layer representation and transformation extensions (FLIR), enhances hardware-aware and compilation guidance support capabilities and scope (HINTS), and Extend the Triton language (TLE).
8+
9+
### New features
10+
11+
* Added multi-backend Support
12+
13+
Currently supported backends include nvidia, amd, triton_shared cpu, iluvatar, xpu, mthreads, metax, aipu, ascend, tsingmicro, cambricon, hcu, __enflame__, with __bold__ indicating newly added ones. <br>
14+
Each new backend maintains the capabilities of the previous version: cross-platform compilation and rapid verification, plugin-based high-differentiation modules, CI/CD, and quality management capabilities. <br>
15+
16+
* Added Triton version support
17+
18+
Added support for Triton 3.4 and 3.5, and established corresponding protected branches.
19+
20+
* Continuous development of FLIR
21+
22+
Ongoing expansion of Linalg intermediate layer representation and transformation extensions, and MLIR extensions to provide programming flexibility, enrich expression capabilities, and improve transformation capabilities. Established paradigm for multi-backend integration with FLIR, integrated ascend backend.
23+
24+
* FlagTree Backend Specialization Unified Design
25+
26+
FlagTree's unified backend specialization design aims to integrate backend integration paradigms, clearly manage backend specialization implementations, and provide an engineering foundation for backend adaptation to Triton version upgrades and migrations. For details, see [FlagTree_Backend_Specialization](/documents/decoupling/), which has been applied to backends such as iluvatar and ascend.
27+
28+
* Compilation Guidance: HINTS
29+
30+
Support for compilation guidance on shared memory + async copy on GPGPU, verified on the triton_v3.5.x branch. For more information, refer to [wiki](https://github.com/flagos-ai/FlagTree/wiki/HINTS).
31+
32+
* Triton Language Extensions: TLE
33+
34+
In response to the challenges facing Triton development, we propose TLE (Triton Language Extensions), which extends Triton at three levels to meet the urgent needs of users at different levels for operator programming languages. For details, see [wiki](https://github.com/flagos-ai/FlagTree/wiki/TLE).
35+
36+
**TLE-Lite** is a lightweight extension to Triton. All features are compatible with various hardware backends, requiring only minor modifications to existing Triton kernels to achieve significant performance improvements. Primarily targeted at algorithm engineers and rapid performance optimization scenarios.
37+
38+
**TLE-Struct** provides classified extensions (such as GPGPU, DSA) through hardware architecture clustering abstraction to meet further performance optimization needs. Requires developers to have some understanding of target hardware characteristics and optimization techniques.
39+
40+
**TLE-Raw** provides the most direct control over hardware, allowing the use of hardware vendors' native programming languages to achieve ultimate performance. Requires developers to have in-depth knowledge of target hardware, primarily targeted at performance optimization experts. For more information, refer to [wiki](https://github.com/flagos-ai/FlagTree/wiki/EDSL).
41+
42+
* Joint construction with FlagGems operator library
43+
44+
Collaborating with [FlagGems](https://github.com/FlagOpen/FlagGems) operator library on version compatibility, backend interfaces, registration mechanisms, and test modifications to support related features. FlagGems operator library has currently been adapted to Triton 3.5.
45+
46+
### Looking ahead
47+
48+
FLIR plans to integrate more backends, completing tsingmicro backend integration in Q1 2026.<br>
49+
Protected branch triton_v3.4.x plans to integrate new backends.<br>
50+
HINTS plans to optimize shared memory hints for GPGPU backends to better collaborate with existing Triton passes, while undergoing functional upgrades.<br>
51+
TLE-Lite plans to extend Tensor slicing and distributed primitives.<br>
52+
TLE-Struct plans to expose more hardware-related primitives and improve performance to approach hardware native languages.<br>
53+
TLE-Raw plans to verify performance improvement opportunities in operators, optimize integration with Triton, while exploring other viable integration languages.<br>

0 commit comments

Comments
 (0)