[AMD][Fix] Qwen3.5: guard zero-grid launch in fused_qk_gemma_rmsnorm(_with_gate) (HIP invalid configuration on idle DP rank) (#31794)
This commit is contained in:
@@ -45,6 +45,7 @@ if is_musa():
|
||||
top_p_renorm_prob,
|
||||
)
|
||||
|
||||
_is_hip = is_hip()
|
||||
_use_aiter = get_bool_env_var("SGLANG_USE_AITER") and is_hip()
|
||||
if _use_aiter:
|
||||
from aiter import greedy_sample as _aiter_greedy_sample
|
||||
@@ -119,6 +120,9 @@ class Sampler(nn.Module):
|
||||
"""
|
||||
logits = logits_output.next_token_logits
|
||||
|
||||
if _is_hip and logits.shape[0] == 0:
|
||||
return torch.empty((0,), dtype=torch.int64, device=logits.device)
|
||||
|
||||
# Preprocess logits (custom processors and NaN handling)
|
||||
logits = self._preprocess_logits(logits, sampling_info)
|
||||
return_sampling_mask = any(sampling_info.return_sampling_masks or [])
|
||||
|
||||
Reference in New Issue
Block a user