[Intel GPU] Enable DeepSeek V3.2 inference on XPU (#24356)
Signed-off-by: P V R K Jyothendra Varma <polisetty.v.r.k.jyothendra.varma@intel.com>
This commit is contained in:
@@ -1062,6 +1062,19 @@ class Indexer(MultiPlatformOp):
|
|||||||
index_k_scale=k_scale,
|
index_k_scale=k_scale,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def forward_xpu(
|
||||||
|
self,
|
||||||
|
x: torch.Tensor,
|
||||||
|
q_lora: torch.Tensor,
|
||||||
|
positions: torch.Tensor,
|
||||||
|
forward_batch: ForwardBatch,
|
||||||
|
layer_id: int,
|
||||||
|
return_indices: bool = True,
|
||||||
|
) -> Optional[torch.Tensor]:
|
||||||
|
return self.forward_cuda(
|
||||||
|
x, q_lora, positions, forward_batch, layer_id, return_indices
|
||||||
|
)
|
||||||
|
|
||||||
def forward_cuda(
|
def forward_cuda(
|
||||||
self,
|
self,
|
||||||
x: torch.Tensor,
|
x: torch.Tensor,
|
||||||
|
|||||||
@@ -1707,7 +1707,7 @@ class ServerArgs:
|
|||||||
self.attention_backend = "nsa"
|
self.attention_backend = "nsa"
|
||||||
logger.info("Use nsa attention backend for DeepSeek with DSA.")
|
logger.info("Use nsa attention backend for DeepSeek with DSA.")
|
||||||
|
|
||||||
if not is_npu(): # CUDA or ROCm GPU
|
if not is_npu() and not is_xpu(): # CUDA or ROCm GPU
|
||||||
if self.enable_nsa_prefill_context_parallel:
|
if self.enable_nsa_prefill_context_parallel:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Context parallel feature is still under experiment. It has only been verified on Hopper platform."
|
"Context parallel feature is still under experiment. It has only been verified on Hopper platform."
|
||||||
|
|||||||
Reference in New Issue
Block a user