Harden DeepSeek V3.2 fused kernel grids (#52381)
Signed-off-by: yimdev <5779256+yimdev@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
e8ad2855e7
commit
eab1cff5b0
@@ -152,8 +152,8 @@ def _fused_norm_rope_kernel(
|
||||
INDEX_ROPE_INTERLEAVE: tl.constexpr,
|
||||
USE_PDL: tl.constexpr,
|
||||
):
|
||||
pid = tl.program_id(0)
|
||||
tok_idx = tl.program_id(1)
|
||||
tok_idx = tl.program_id(0).to(tl.int64)
|
||||
pid = tl.program_id(1)
|
||||
if USE_PDL:
|
||||
tl.extra.cuda.gdc_wait()
|
||||
tl.extra.cuda.gdc_launch_dependents()
|
||||
@@ -479,7 +479,7 @@ def fused_norm_rope(
|
||||
if q_c_out is None:
|
||||
q_c_out = torch.empty_like(q_c)
|
||||
use_pdl = current_platform.is_arch_support_pdl()
|
||||
_fused_norm_rope_kernel[(4, num_tokens)](
|
||||
_fused_norm_rope_kernel[(num_tokens, 4)](
|
||||
positions,
|
||||
# Q RMS norm
|
||||
q_c,
|
||||
@@ -594,8 +594,8 @@ def _fused_q_kernel(
|
||||
QUANTIZE_MQA: tl.constexpr,
|
||||
USE_PDL: tl.constexpr,
|
||||
):
|
||||
pid = tl.program_id(0)
|
||||
tok_idx = tl.program_id(1)
|
||||
tok_idx = tl.program_id(0).to(tl.int64)
|
||||
pid = tl.program_id(1)
|
||||
head_idx = tl.program_id(2)
|
||||
if USE_PDL:
|
||||
tl.extra.cuda.gdc_wait()
|
||||
@@ -869,7 +869,7 @@ def fused_q(
|
||||
return index_q_fp8, index_weights_out, mqa_q
|
||||
|
||||
use_pdl = current_platform.is_arch_support_pdl()
|
||||
_fused_q_kernel[(3, num_tokens, grid_heads)](
|
||||
_fused_q_kernel[(num_tokens, 3, grid_heads)](
|
||||
positions,
|
||||
q_pe,
|
||||
q_pe.stride(0),
|
||||
|
||||
Reference in New Issue
Block a user