Repository navigation
fix(npu): pin triton-ascend 3.6.0 and fix the Ascend Triton faults - #1567
Merged
Merged
Conversation
zheliuyu
force-pushed
the
upgrade/triton-ascend-3.6.0
branch
from
October 27, 2026 08:44
c992dc1 to
0580b43
Compare
zheliuyu
force-pushed
the
upgrade/triton-ascend-3.6.0
branch
6 times, most recently
from
November 5, 2026 08:35
5b34958 to
c2f3b94
Compare
zheliuyu
force-pushed
the
upgrade/triton-ascend-3.6.0
branch
from
November 5, 2026 09:10
c2f3b94 to
cd9c73d
Compare
Contributor
Author
Tcc0403
reviewed
Nov 5, 2026
Contributor
Author
|
@Tcc0403 Benchmarks for triton-ascend 3.2.2: #1426 Benchmark — CANN 9.1.0, Ascend910_9382Token-length sweep: 1024 / 2048 / 4096 / 8192. SwiGLU
RMSNorm
RoPE
Cross Entropy
Fused Linear Cross Entropy
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





















Summary
Pin the Ascend NPU install to Triton-Ascend 3.6.0 and cap CV workspace slots to one. CANN stays 9.1.0. torch, torch_npu, and torchvision move together so the stack stays installable. Kernels that already had a Triton implementation stay on Triton-Ascend. No PyTorch stand-in was added.
Details
Triton-Ascend 3.6.0 ships BiShengIR 2.0, which pipelines mix kernels with a 4-slot CV workspace by default. A2 and A3 have a 192KB unified buffer, so four slots overflow (
ub overflow, requires 2883840 bits while 1572864 bits available, multi-buffer enabled).install_ascend_compile_kwargs()setsset_workspace_multibuffer=1whenNPUOptionshas that field. Triton-Ascend 3.2.x does not have the field, so those launches stay unchanged. An explicit caller value is kept.Two Triton lowerings also change on 3.6.0:
tl.cumsumno longer assigns unique MoE ranks. The permutation stops being invertible, and the next launch stores an out-of-range index (vector core 507035). The rank is now a scalartl.atomic_add. GEMM and SwiGLU are unchanged.tl.sortis not used.tl.static_rangeunrolls into the same 192KB buffer. AttnRes backward used to cap that loop at 32 blocks, so N=40 dropped the tail. The loop is nowtl.range(0, n_blocks). Forward staystl.static_rangebecausen_blocksis constexpr there.Host-side adjustments still call the existing Triton kernels:
rotary_dimand rotates only that prefix. An explicit width is not inferred from a narrower cos/sin table (GPT-OSS).torch.compilere-emits a string constexpr as a bare name. A tie subgradient is 0, and an all-ignored batch does not divide.(B, 1)scale as(B, L)so the kernel does not read off the row.These tests are skipped on NPU. They are not replaced with PyTorch:
fbdea0ff) the file passed only becausepytest.importorskip("triton.tools.tensor_descriptor")skipped it. 3.2.2 does not ship that module. 3.6.0 does, the tests actually run, and the CUDA TMA kernel hitsassert is_cuda. There was no NPU MLP kernel in that 3.2.2 run.mHC still disables auto-multi-buffer, and neighborhood attention still synchronizes between forwards.
setup.pyand the README list the new pins.docs/index.mdis unchanged. Existing NPU environments need to reinstall.Testing Done
pytest test/transformers/pytest test/transformers/test_attn_res.py test/transformers/test_fused_moe.pyafter the final trim (52 passed, including N=40 and the routing invariants)ruff checkon the touched filesmake test-convergence