[BugFix][CPU][Spec Decode] Fix Eagle implementation on CPU backend (#42468)
Signed-off-by: Ofir Zafrir <ofir.zafrir@intel.com>
This commit is contained in:
@@ -313,6 +313,10 @@ def apply_top_k_top_p(
|
||||
if p is None and k is None:
|
||||
return logits
|
||||
|
||||
# Keep CPU logits on the PyTorch path to avoid invoking Triton kernels.
|
||||
if current_platform.is_cpu():
|
||||
return apply_top_k_top_p_pytorch(logits, k, p, allow_cpu_sync=True)
|
||||
|
||||
if HAS_TRITON and logits.shape[0] >= 8:
|
||||
return apply_top_k_top_p_triton(logits, k, p)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user