Skip to content
i3wanna2 edited this page Jan 16, 2026 · 2 revisions

FlagTree Wiki

Welcome to the FlagTree wiki! This wiki provides comprehensive documentation about FlagTree, including its architecture, design principles, and usage guides.

Overview

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. FlagTree extends Triton in two main directions:

  1. Multi-Backend Support - FlagTree enables Triton to run on different hardware backends by providing backend-specific implementations, and also maintains the common Linalg Project FLIR.
  2. Language Extensions - FlagTree adds new language constructs and compiler optimizations beyond native Triton.

FlagTree maintains full compatibility with native Triton code while enabling hardware-specific optimizations and advanced language features.

Documentation

Architecture

  • Architecture - FlagTree's code structure, extension mechanisms, and overall architecture. Covers how FlagTree integrates with Triton through plugin-based backend architecture, language extensions, MLIR dialect extensions, and IR transformations. For compiler developers: understand the codebase organization, extension points, and how to add new backends or language features. See the step-by-step tutorial for detailed instructions.

Language & Compiler Optimization Extensions

Language extensions and compiler optimizations. Each document covers both programmer usage and compiler developer implementation details.

  • TLE (Triton Language Extensions) - TLE-Lite, TLE-Struct, TLE-Raw: multi-level extensions to Triton
  • HINTS - Non-invasive performance hints via #@hint: comments
  • EDSL - MLIR-based DSL for writing native code and integrating with Triton kernels

Project Information

  • Project Info - GitHub organization (flagos-ai), version release process, branch organization, supported backends (NVIDIA, AMD, Ascend, AIPU, ILUVATAR, Moore Threads, Cambricon, Tsingmicro, Enflame, etc.). Different backends are organized in different branches due to vendor-specific Triton version constraints.

Clone this wiki locally