Thanks to the flash-linear-attention community for merging our native NPU support PR.
This roadmap outlines upcoming plans for native NPU support. Feedback and discussion are welcome.
Native NPU Support in flash-linear-attention
Native support is built on top of flash-linear-attention's dispatch system:
We have validated this approach for NPU adaptation work:
The following diagram illustrates the flow for adapting kernels under fla/modules/:
User / model code (unchanged)
│
▼
fla/modules/<module>.py # Public API + @dispatch('modules') hooks only
│
▼
fla/ops/backends # Runtime backend selection (BackendRegistry)
│
▼
fla/modules/backends/triton_ascend/ # NPU Triton kernels + launchers
├── __init__.py # TritonAscendBackend registration
├── rotary.py
├── fused_cross_entropy.py
├── fused_linear_cross_entropy.py
├── activations.py
├── fused_kl_div.py
├── layernorm.py
├── grpo.py
└── causal_conv1d.py
Dependency Installation
Note that flash-linear-attention already supports other devices such as XPU and AMD:
NPU CI Setup
Future native adaptations will introduce a substantial amount of triton-ascend code, making NPU CI especially important. We plan to use the CI tooling provided by ascend-gha-runners:
Reference:
This is our top priority at the current stage, and work is still in progress.
Adaptation Order
At a high level, adaptation work is organized as follows:
For the remaining work, we propose the following order within fla/ops/:
Skills
Because triton-ascend differs from upstream triton in programming model and performance characteristics, migrating kernels to NPU requires additional tuning time. We plan to capture reusable migration skills to improve efficiency over time.
Hardware Coverage
For current migration work, we recommend validating on the following hardware:
- Atlas 800T A2 (32G, x86)
- Atlas 800T A3 (64G, x86)
We expect to publish validation results on additional hardware platforms in future updates.
Integration with Training Frameworks
Once native NPU adaptation of flash-linear-attention reaches a sufficient level of maturity, we need to demonstrate real-world usability by running end-to-end SFT or RL workflows in production training frameworks. We plan to validate integration through the following projects:
tilelang-ascend Support
flash-linear-attention also provides a tilelang DSL backend. Ascend offers tilelang-ascend, and native support may be feasible in the future. Whether we start this effort will depend on community feedback. For now, the primary focus remains on triton-ascend.
Thanks to the flash-linear-attention community for merging our native NPU support PR.
This roadmap outlines upcoming plans for native NPU support. Feedback and discussion are welcome.
Native NPU Support in flash-linear-attention
Native support is built on top of flash-linear-attention's dispatch system:
We have validated this approach for NPU adaptation work:
The following diagram illustrates the flow for adapting kernels under
fla/modules/:Dependency Installation
Note that flash-linear-attention already supports other devices such as XPU and AMD:
NPU CI Setup
Future native adaptations will introduce a substantial amount of
triton-ascendcode, making NPU CI especially important. We plan to use the CI tooling provided byascend-gha-runners:Reference:
This is our top priority at the current stage, and work is still in progress.
Adaptation Order
At a high level, adaptation work is organized as follows:
fla/modules/fla/ops/fla/layers/fla/models/For the remaining work, we propose the following order within
fla/ops/:fla/ops/based/native.py,tests/ops/test_based.pyfla/ops/based/parallel.py,tests/ops/test_based.pyfla/ops/based/fused_chunk,tests/ops/test_based.pyfla/ops/utils/cumsum.py,tests/ops/utils/test_cumsum.pyfla/ops/utils/index.py,tests/ops/utils/test_index.pyfla/ops/utils/cache.py,tests/ops/test_cache.pyfla/ops/common/*fla/ops/gated_delta_rule/*fla/ops/gated_delta_product/*fla/ops/gdn2/*fla/ops/kda/*Other kernelsSkills
Because
triton-ascenddiffers from upstreamtritonin programming model and performance characteristics, migrating kernels to NPU requires additional tuning time. We plan to capture reusable migration skills to improve efficiency over time.Hardware Coverage
For current migration work, we recommend validating on the following hardware:
We expect to publish validation results on additional hardware platforms in future updates.
Integration with Training Frameworks
Once native NPU adaptation of flash-linear-attention reaches a sufficient level of maturity, we need to demonstrate real-world usability by running end-to-end SFT or RL workflows in production training frameworks. We plan to validate integration through the following projects:
tilelang-ascend Support
flash-linear-attention also provides a
tilelangDSL backend. Ascend offerstilelang-ascend, and native support may be feasible in the future. Whether we start this effort will depend on community feedback. For now, the primary focus remains ontriton-ascend.