Triton-distributed-ascend documentation¶
Triton-distributed-ascend is a distributed computing framework extended from the Triton language and optimized for Ascend AI processors. It enables efficient distributed computing on Ascend NPUs, with communication primitives and computation-communication overlap optimizations aimed at large-scale distributed training and inference.
The project builds on the multi-level abstraction capabilities of MLIR to map distributed operators written in Triton onto Ascend AI processors, and exposes fine-grained interfaces for controlling on-chip memory and pipeline synchronization.
Getting Started¶
Work through these in order:
Installation — hardware and software prerequisites, CANN setup, and Python dependencies.
Build from Source — building Triton-distributed-ascend, AscendNPU-IR, and shmem from source.
Quick Start — running your first distributed kernel and verifying the installation.
Key Features¶
Distributed communication primitives — AllReduce, AllGather, ReduceScatter, All2All.
Computation-communication overlap — overlapped execution for improved throughput.
AscendNPU IR-based compiler optimizations — optimizations that use Ascend hardware features directly.
Python-friendly interfaces — concise Python APIs that integrate into existing deep learning frameworks.
Architecture¶
Distributed Architecture Design — Distributed architecture design, compilation pipeline, and communication engine details.
API Reference¶
The API documentation covers six main areas:
Triton-distributed Semantics — Design philosophy, semantic model, and programming patterns for tile-centric computation-communication overlap.
triton_dist.language API — Distributed operations for Triton kernels (
wait,consume_token,rank,num_ranks,symm_at,notify,extern_call).SHMEM Device API — Device-side ACLSHMEM APIs for use within kernels (RMA operations, signaling, barriers, and synchronization).
SHMEM Host API — Host-side ACLSHMEM APIs for initialization, memory management, and host-initiated communication.
Swizzle Helper API — Swizzle helper functions for GEMM and communication tile scheduling.
Autotuning API — Distributed autotune API for multi-device kernel tuning.
Developer Guide¶
Kernel Debugging — Extracting IR, printing compiler passes, and debugging synchronization issues with
bishengir-compileflags.Environment Variables and Compiler Options — Environment variables and compiler options for debugging and optimization.
Multi-Card Communication-Computation Fusion Operator Precision Verification — Multi-card fusion operator precision verification.
Single Operator Development — Single operator development with distributed kernels.
Performance Optimization Guide — Performance optimization techniques and best practices.
Autotune Tuning Usage Instructions — Operator performance testing and autotune feature usage.
developer-guide/kernel-performance/profiling — Kernel performance profiling guide.
Tutorials & Examples¶
All‑Gather and GEMM Fused Distributed Kernel Implementation — AllGather and GEMM fusion optimization tutorial.
UDMA Reverse All2All Autotune Practice — Autotune example and optimization practices.
Reverse All2All Distributed Kernel for EP MoE — Reverse All2All for EP MoE distributed kernels.
Reference¶
FAQ — Frequently asked questions and troubleshooting.
Glossary — Professional terms and abbreviations used in this document.