A high-throughput and memory-efficient inference and serving engine for LLMs
[XPU] Cap topk/topp Triton BLOCK_SIZE to 4096 to fix Top-p mask difference failures (#44470)
Signed-off-by: Chaojun Zhang <chaojun.zhang@intel.com>
Chaojun Zhang committed
Jun 8, 2026 at 17:36 UTC
fa662b1a8b497e10eb7d6e2a458048c1c9508b72
2 files changed
+6
-1
.buildkite/intel_jobs/misc_intel.yaml
+2
-1
@@ -62,7 +62,8 @@ steps:
62
pytest -v -s v1/logits_processors --ignore=v1/logits_processors/test_custom_online.py --ignore=v1/logits_processors/test_custom_offline.py &&
63
pytest -v -s v1/test_oracle.py &&
64
pytest -v -s v1/test_request.py &&
65
- pytest -v -s v1/test_outputs.py'
65
+ pytest -v -s v1/test_outputs.py &&
66
+ pytest -v -s v1/sample/test_topk_topp_sampler.py'
67
68
- label: XPU CPU Offload
69
timeout_in_minutes: 60
vllm/v1/sample/ops/topk_topp_triton.py
+4
@@ -929,8 +929,12 @@ def apply_top_k_top_p_triton(
929
normal_cdf_to_sigma_table, percentile_to_std_table = tables
930
931
# Smaller tiles compile and run faster on CPU; GPU benefits from larger tiles.
932
+ # On XPU, large BLOCK_SIZE causes precision loss in the single-pass pivot
933
+ # approximation; use smaller tiles for accurate top-p results.
934
if logits.device.type == "cpu":
935
block_size, block_size_trunc = 256, 128
936
+ elif logits.device.type == "xpu":
937
+ block_size, block_size_trunc = 4096, 2048
938
else:
939
block_size, block_size_trunc = 8192, 4096
940