[NPU][BugFix] Avoid M-RoPE recompilation for variable sequence lengths (#40371)

Co-authored-by: Xiaoyu Zhang <1182563586@qq.com>
This commit is contained in:
Tao Li
2026-09-22 08:19:25 +08:00
committed by GitHub
co-authored by Xiaoyu Zhang
parent 61d0cf2074
commit c53cc8e1eb
+5 -2
View File
@@ -7,11 +7,14 @@ import triton
import triton.language as tl
@triton.jit
# Sequence length varies across requests. Specializing S would create one
# compiled kernel variant per observed length, while the existing mask handles
# the final partial block.
@triton.jit(do_not_specialize=["S"])
def apply_interleaved_rope_kernel(
x_ptr,
out_ptr,
S: tl.constexpr,
S,
D: tl.constexpr,
stride_x_m,
stride_x_s,