mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
update ipex and rocm to torch 2.12
This commit is contained in:
+3
-3
@@ -668,9 +668,9 @@ def install_rocm_zluda():
|
||||
torch_command = os.environ.get('TORCH_COMMAND', '--upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm7.1')
|
||||
else:
|
||||
if rocm.version is None or float(rocm.version) >= 7.2: # assume the latest if version check fails
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.11.0+rocm7.2 torchvision==0.26.0+rocm7.2 --index-url https://download.pytorch.org/whl/rocm7.2')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.12.0+rocm7.2 torchvision==0.27.0+rocm7.2 --index-url https://download.pytorch.org/whl/rocm7.2')
|
||||
elif rocm.version == "7.1":
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.11.0+rocm7.1 torchvision==0.26.0+rocm7.1 --index-url https://download.pytorch.org/whl/rocm7.1')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.12.0+rocm7.1 torchvision==0.27.0+rocm7.1 --index-url https://download.pytorch.org/whl/rocm7.1')
|
||||
elif rocm.version == "7.0":
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.10.0+rocm7.0 torchvision==0.25.0+rocm7.0 --index-url https://download.pytorch.org/whl/rocm7.0')
|
||||
elif rocm.version == "6.4":
|
||||
@@ -708,7 +708,7 @@ def install_ipex():
|
||||
if args.use_nightly:
|
||||
torch_command = os.environ.get('TORCH_COMMAND', '--upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/xpu')
|
||||
else:
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.11.0+xpu torchvision==0.26.0+xpu --index-url https://download.pytorch.org/whl/xpu')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.12.0+xpu torchvision==0.27.0+xpu --index-url https://download.pytorch.org/whl/xpu')
|
||||
|
||||
ts('ipex', t_start)
|
||||
return torch_command
|
||||
|
||||
@@ -67,7 +67,6 @@ def ipex_init(): # pylint: disable=too-many-statements
|
||||
torch.cuda.stream = torch.xpu.stream
|
||||
torch.cuda.Event = torch.xpu.Event
|
||||
torch.cuda.Stream = torch.xpu.Stream
|
||||
torch.cuda.Optional = torch.xpu.Optional
|
||||
torch.cuda.streams = torch.xpu.streams
|
||||
torch.cuda.Any = torch.xpu.Any
|
||||
torch.cuda.default_generators = torch.xpu.default_generators
|
||||
@@ -165,6 +164,9 @@ def ipex_init(): # pylint: disable=too-many-statements
|
||||
torch.cuda._device = torch.xpu._device
|
||||
torch.cuda._device_t = torch.xpu._device_t
|
||||
|
||||
if torch_version[0] < 2 or (torch_version[0] == 2 and torch_version[1] < 12):
|
||||
torch.cuda.Optional = torch.xpu.Optional
|
||||
|
||||
# Memory:
|
||||
if "linux" in sys.platform and "WSL2" in os.popen("uname -a").read():
|
||||
torch.xpu.empty_cache = return_none
|
||||
|
||||
Reference in New Issue
Block a user