awsr
2025-11-21 15:43:23 -08:00
parent 25d05b1445
commit b4ba041aa5
+3 -3
View File
@@ -50,8 +50,8 @@ def ipex_init(): # pylint: disable=too-many-statements
torch.Tensor.is_cuda = torch.Tensor.is_xpu
torch.nn.Module.cuda = torch.nn.Module.xpu
torch.cuda.Optional = torch.xpu.Optional
torch.cuda.__cached__ = torch.xpu.__cached__
torch.cuda.__loader__ = torch.xpu.__loader__
torch.cuda.__cached__ = getattr(torch.xpu, "__cached__", None)
torch.cuda.__loader__ = getattr(torch.xpu, "__loader__", None)
torch.cuda.streams = torch.xpu.streams
torch.cuda.Any = torch.xpu.Any
torch.cuda.__doc__ = torch.xpu.__doc__
@@ -62,7 +62,7 @@ def ipex_init(): # pylint: disable=too-many-statements
torch.cuda.torch = torch.xpu.torch
torch.cuda.Union = torch.xpu.Union
torch.cuda.__annotations__ = torch.xpu.__annotations__
torch.cuda.__package__ = torch.xpu.__package__
torch.cuda.__package__ = getattr(torch.xpu, "__package__", None)
torch.cuda.__builtins__ = torch.xpu.__builtins__
torch.cuda._lazy_init = torch.xpu._lazy_init
torch.cuda.StreamContext = torch.xpu.StreamContext