mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
Futureproofing for imports
Deprecation info: - https://docs.python.org/3.14/reference/datamodel.html#module.__package__ - https://docs.python.org/3.14/reference/datamodel.html#module.__loader__ - https://docs.python.org/3.14/reference/datamodel.html#module.__cached__
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user