flagos-ai/FlagTree

FlagTree is a unified compiler supporting multiple AI chip backends for custom Deep Learning operations, which is forked from triton-lang/triton.

What it solves

FlagTree addresses the fragmentation in the AI software ecosystem. Currently, different AI chips require their own specific software stacks, which makes porting and maintaining AI workloads expensive and difficult. FlagTree provides a unified compiler that allows developers to write code once and run it across a wide variety of AI hardware.

How it works

FlagTree acts as a unified compiler built on top of the Triton framework. It supports multiple hardware backends by integrating them into a single-repository structure. For developers needing more granular control over hardware, it provides Triton Language Extensions (TLE). These extensions allow for progressive, hardware-specific tuning—ranging from portable usage to low-level hardware primitives—without breaking compatibility with standard Triton workflows.

Who it’s for

FlagTree is designed for two primary groups: upstream model users who want a consistent way to compile and run models across different AI chips, and downstream chip manufacturers who need a structured way to integrate their hardware into the broader Triton ecosystem.

Highlights

  • Supports a wide range of AI accelerators, including NVIDIA, AMD, Huawei Ascend, and many others.
  • Enables "develop once, run anywhere" workflows to reduce maintenance costs.
  • Includes TLE (Triton Language Extensions) for advanced performance tuning and hardware-specific control.
  • Delivers measurable performance improvements for real-world models without requiring changes to existing operator code.
  • Maintains active CI/CD support for all integrated hardware backends.

Related

  • Project
  • Project
  • Project
  • Dispatch
  • Project