[Hardware][XPU] Register matmul and linear batch-invariant kernels for XPU (#49209)
Signed-off-by: tzielinski-habana <tomasz.zielinski@intel.com> Signed-off-by: Tomasz Zielinski <85164140+tzielinski-habana@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Claude Opus 5
Harry Mellor
parent
7894394b07
commit
ffe3bb3c72
@@ -228,7 +228,9 @@ class UnquantizedLinearMethod(LinearMethodBase):
|
||||
x: torch.Tensor,
|
||||
bias: torch.Tensor | None = None,
|
||||
) -> torch.Tensor:
|
||||
if envs.VLLM_BATCH_INVARIANT and current_platform.is_cuda_alike():
|
||||
if envs.VLLM_BATCH_INVARIANT and (
|
||||
current_platform.is_cuda_alike() or current_platform.is_xpu()
|
||||
):
|
||||
return linear_batch_invariant(x, layer.weight, bias)
|
||||
return self._gemm_impl(layer, x, layer.weight, bias)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user