[NPU] Pin torch/torch_npu=2.9.0, triton-ascend=3.2.2 and cann=9.1.0 for NPU - #1392
Draft
zheliuyu wants to merge 2 commits into
Draft
[NPU] Pin torch/torch_npu=2.9.0, triton-ascend=3.2.2 and cann=9.1.0 for NPU#1392zheliuyu wants to merge 2 commits into
zheliuyu wants to merge 2 commits into
Conversation
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
Adapt three Ascend kernels to the new stack (
torch/torch_npu2.9.0,triton-ascend3.2.2, CANN 9.1 / BiShengIR 1.2.0).tritonitself stays 3.2.0; the failures come from compiler/runtime default changes intriton-ascend3.2.2, not from test logic.Each change is scoped to the kernel that actually hits a 3.2.2 constraint. GPU paths are untouched. The same sources still run on the previous stack (
torch/torch_npu2.7.1 +triton-ascend3.2.1).Details
Stack delta that matters:
3.2.2 defaults
multibuffer=Trueand cannot lower some mix cube+vector programs to static UB shapes. Fixes:Fused MoE — fp32
_fused_up_proj_swiglu_kernelfailed compile withConvertLinalgRToBinary/Failed to obtain op buffer shape size which should be static. Cause: gather + dualtl.dot+ SwiGLU in one kernel. Fix: cube kernel writespre_actonly; new vector kernel_swiglu_from_pre_act_kerneldoessilu(gate) * up. Routing / down-proj / backward unchanged.mHC — auto-multi-buffer races fp32 mix cube+vector results and hangs compiling mix +
tl.atomic_add. Fix: passmultibuffer=Falseonly on those launches (mm_norm_fwd/bwd,pre_bwd,post_res_bwd,coeffs_bwd_assemble). Vector-only forward kernels keep the 3.2.1 default.Fused neighborhood attention — consecutive forwards on the same stream hang until QK+AV retire (
test_fused_neighborhood_attention_deterministic). Fix:torch.npu.current_stream().synchronize()after the AV launch (stream-local, not a device-wide barrier).Testing Done
torch2.9.0,torch_npu2.9.0,triton-ascend3.2.2, CANN 9.1)make testto ensure correctnessmake checkstyleto ensure code stylemake test-convergenceto ensure convergenceTargeted pytest on 3.2.2:
Coming soon.