Support speculative decoding on CPU (#27862)

Co-authored-by: Valentine233 <xuan.liao@intel.com>
This commit is contained in:
Haotong Zou
2026-07-09 10:27:09 +08:00
committed by GitHub
co-authored by Valentine233
parent 177c048c68
commit 3b43df5b6d
36 changed files with 3499 additions and 138 deletions
+14
View File
@@ -305,3 +305,17 @@ def transfer_kv_all_layer_mla_lf_pf(
block_quota,
num_warps_per_block,
)
def copy_all_layer_kv_cache_cpu(
data_ptrs: torch.Tensor,
strides: torch.Tensor,
tgt_loc: torch.Tensor,
src_loc: torch.Tensor,
):
torch.ops.sgl_kernel.copy_all_layer_kv_cache_cpu(
data_ptrs,
strides,
tgt_loc,
src_loc,
)