[Hardware][XPU] Register batch-invariant kernels for XPU (#41934)

Signed-off-by: tzielinski-habana <tomasz.zielinski@intel.com>
Signed-off-by: Tomasz Zielinski <85164140+tzielinski-habana@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Chendi.Xue <chendi.xue@intel.com>
This commit is contained in:
Tomasz Zielinski
2026-07-15 11:19:44 -04:00
committed by GitHub
co-authored by gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Chendi.Xue
parent 05eed72aec
commit 61141ed265
6 changed files with 127 additions and 55 deletions
+13 -1
View File
@@ -11,11 +11,13 @@ from utils import (
TEST_MODEL,
_extract_step_logprobs,
_random_prompt,
skip_if_not_cuda,
skip_unsupported,
)
import vllm.envs as envs
from vllm import LLM, SamplingParams
from vllm.platforms import current_platform
@skip_unsupported
@@ -49,6 +51,11 @@ def test_v1_generation_is_deterministic_across_batch_sizes_with_needle(
seed.
- Keep max_tokens and max_model_len bounded for speed and memory use.
"""
# Not all batch-invariant kernels are registered on XPU yet
# (e.g. attention, custom ops), so e2e determinism is not guaranteed.
if current_platform.is_xpu():
pytest.xfail("Not all batch-invariant kernels registered on XPU yet")
seed = int(os.getenv("VLLM_TEST_SEED", "12345"))
random.seed(seed)
@@ -157,6 +164,11 @@ def test_logprobs_bitwise_batch_invariance_bs1_vs_bsN(
block_m,
block_n,
):
# Not all batch-invariant kernels are registered on XPU yet
# (e.g. attention, custom ops), so e2e determinism is not guaranteed.
if current_platform.is_xpu():
pytest.xfail("Not all batch-invariant kernels registered on XPU yet")
seed = int(os.getenv("VLLM_TEST_SEED", "12345"))
random.seed(seed)
tp_size = int(os.getenv("VLLM_TEST_TP_SIZE", "1"))
@@ -641,7 +653,7 @@ def test_logprobs_without_batch_invariance_should_fail(
pytest.fail(fail_msg)
@skip_unsupported
@skip_if_not_cuda
@pytest.mark.parametrize("backend", ["FLASH_ATTN"])
def test_decode_logprobs_match_prefill_logprobs(
backend,