diff --git a/python/sglang/kernels/ops/attention/mrope.py b/python/sglang/kernels/ops/attention/mrope.py index 71e48155b..f5416a3a0 100644 --- a/python/sglang/kernels/ops/attention/mrope.py +++ b/python/sglang/kernels/ops/attention/mrope.py @@ -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,