[MRV2][XPU] use xpu sample kernel in mrv2 sampler (#57277)

Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
liuzhenwei
2026-09-21 13:24:41 +08:00
committed by GitHub
co-authored by Kunshang Ji
parent 76ee20c1ec
commit 6654bcbfca
3 changed files with 89 additions and 43 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ class GPUWatermarkSampler(Sampler):
pos: torch.Tensor,
top_k: torch.Tensor | None,
top_p: torch.Tensor | None,
use_flashinfer: bool,
use_fused_sampler: bool,
) -> tuple[torch.Tensor, torch.Tensor]:
enabled = self.watermarking.np[idx_mapping_np] & (
self.sampling_states.temperature.np[idx_mapping_np] != 0
@@ -71,7 +71,7 @@ class GPUWatermarkSampler(Sampler):
pos,
top_k,
top_p,
use_flashinfer,
use_fused_sampler,
)
processed_logits = apply_top_k_top_p(processed_logits, top_k, top_p)