[Qwen3Next] Optimize fused_sigmoid_gating_delta_rule_update_kernel (#18271)

This commit is contained in:
hlu1
2026-02-06 19:59:42 -08:00
committed by GitHub
parent 9fbec79906
commit 4637970dfb

View File

@@ -190,7 +190,7 @@ def fused_sigmoid_gating_delta_rule_update(
B, T, H, K, V = *k.shape, v.shape[-1]
HV = v.shape[2]
N = B if cu_seqlens is None else len(cu_seqlens) - 1
BK, BV = triton.next_power_of_2(K), min(triton.next_power_of_2(V), 8)
BK, BV = triton.next_power_of_2(K), min(triton.next_power_of_2(V), 32)
NK, NV = triton.cdiv(K, BK), triton.cdiv(V, BV)
assert NK == 1, "NK > 1 is not supported yet"
num_stages = 3