[Perf] Tune Triton GDN decode tiles on SM100-family GPUs (#61355)
Signed-off-by: Thien Tran <gau.nernst@yahoo.com.sg> Co-authored-by: OpenAI Codex <noreply@openai.com>
This commit is contained in:
co-authored by
OpenAI Codex
parent
183625d4f9
commit
656d0d4506
@@ -10,6 +10,7 @@
|
||||
|
||||
import torch
|
||||
|
||||
from vllm.platforms import current_platform
|
||||
from vllm.triton_utils import tl, triton
|
||||
|
||||
from .op import exp, log
|
||||
@@ -439,6 +440,17 @@ def fused_recurrent_gated_delta_rule_packed_decode(
|
||||
f"Packed decode kernel only supports NK=1 (got K={K}, BK={BK})."
|
||||
)
|
||||
BV = min(triton.next_power_of_2(V), 32)
|
||||
if (
|
||||
K == V == 128
|
||||
and current_platform.is_cuda()
|
||||
and current_platform.is_device_capability_family(100, device_id=dev.index)
|
||||
):
|
||||
# Tuned on GB300; validated on GB200 and with 148 SMs.
|
||||
# MRv2 decode warmup/graph capture compiles the reachable BV variants.
|
||||
if B * HV <= 64:
|
||||
BV = 4
|
||||
elif initial_state.dtype == torch.float32:
|
||||
BV = 8
|
||||
num_stages = 3
|
||||
num_warps = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user