Unverified Commit e6d811dd authored by jianyizh's avatar jianyizh Committed by GitHub
Browse files

[XPU] fallback to native implementation for xpu custom op (#7670)

parent c4be16e1
......@@ -30,7 +30,9 @@ class CustomOp(nn.Module):
return self.forward_cuda(*args, **kwargs)
def forward_xpu(self, *args, **kwargs):
raise NotImplementedError
# By default, we assume that XPU ops are compatible with the
# PyTorch-native implementation.
return self.forward_native(*args, **kwargs)
def forward_cpu(self, *args, **kwargs):
# By default, we assume that CPU ops are compatible with CUDA ops.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment