[XPU] Fix test_spec_decode_logprobs: use FLASH_ATTN for XPU in GPU_DETERMINISM_KWARGS (#44468)

Signed-off-by: Chaojun Zhang <chaojun.zhang@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
Chaojun Zhang
2026-06-17 11:07:04 +08:00
committed by GitHub
co-authored by Kunshang Ji
parent aa0ac8a661
commit 556b063e45
2 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -63,7 +63,8 @@ steps:
pytest -v -s v1/test_oracle.py &&
pytest -v -s v1/test_request.py &&
pytest -v -s v1/test_outputs.py &&
pytest -v -s v1/sample/test_topk_topp_sampler.py'
pytest -v -s v1/sample/test_topk_topp_sampler.py &&
pytest -v -s v1/sample/test_logprobs.py'
- label: XPU CPU Offload
timeout_in_minutes: 60
+7 -6
View File
@@ -42,11 +42,12 @@ SAMPLE_PROMPT = BatchLogprobsComposition.SAMPLE_PROMPT
#
# Force LLM instances into an identical, deterministic execution
# mode so the test isolates spec-decode correctness only:
ROCM_DETERMINISM_KWARGS: dict = (
dict(max_num_seqs=1, attention_backend="TRITON_ATTN")
if current_platform.is_rocm()
else {}
)
if current_platform.is_rocm():
GPU_DETERMINISM_KWARGS: dict = dict(max_num_seqs=1, attention_backend="TRITON_ATTN")
elif current_platform.is_xpu():
GPU_DETERMINISM_KWARGS = dict(max_num_seqs=1, attention_backend="FLASH_ATTN")
else:
GPU_DETERMINISM_KWARGS = {}
@pytest.fixture(
@@ -1127,7 +1128,7 @@ def test_spec_decode_logprobs(
enable_chunked_prefill=True,
max_num_batched_tokens=32,
enable_prefix_caching=False,
**ROCM_DETERMINISM_KWARGS,
**GPU_DETERMINISM_KWARGS,
)
# Run base LLM.