A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 18:15 UTC
[XPU] fallback to native implementation for xpu custom op (#7670)
jianyizh committed
Aug 20, 2024 at 15:26 UTC
e6d811dd13a0ad81a1efc67c97d8812e823db5a7
1 file changed
+3
-1
vllm/model_executor/custom_op.py
+3
-1
@@ -30,7 +30,9 @@ class CustomOp(nn.Module):
30
return self.forward_cuda(*args, **kwargs)
31
32
def forward_xpu(self, *args, **kwargs):
33
- raise NotImplementedError
33
+ # By default, we assume that XPU ops are compatible with the
34
+ # PyTorch-native implementation.
35
+ return self.forward_native(*args, **kwargs)
36
37
def forward_cpu(self, *args, **kwargs):
38
# By default, we assume that CPU ops are compatible with CUDA ops.