Skip to content

Commit 9cb6e4c

Browse files
committed
upgrade
1 parent d7e67c6 commit 9cb6e4c

3 files changed

Lines changed: 229 additions & 99 deletions

File tree

modules/devices.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from functools import lru_cache
44

55
import torch
6-
from modules import errors, shared, npu_specific
6+
from modules import errors, shared, npu_specific, rocm
77

88
if sys.platform == "darwin":
99
from modules import mac_specific
@@ -34,6 +34,10 @@ def has_zluda() -> bool:
3434
return False
3535

3636

37+
def get_hip_agent() -> rocm.Agent:
38+
return rocm.Agent(device)
39+
40+
3741
def cuda_no_autocast(device_id=None) -> bool:
3842
if device_id is None:
3943
device_id = get_cuda_device_id()

modules/launch_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ def check_python_version():
3838
micro = sys.version_info.micro
3939

4040
if is_windows:
41-
supported_minors = [10, 11]
41+
supported_minors = [11, 12]
4242
else:
43-
supported_minors = [7, 8, 9, 10, 11]
43+
supported_minors = [10, 11, 12]
4444

4545
if not (major == 3 and minor in supported_minors):
4646
import modules.errors
@@ -564,7 +564,7 @@ def prepare_environment():
564564
if device.therock is None:
565565
backend = "zluda"
566566
else:
567-
run_pip(f"install rocm rocm-sdk-core --index-url https://rocm.nightlies.amd.com/v2-staging/{device.therock}", "rocm")
567+
run_pip(f"install rocm rocm-sdk-core --index-url https://rocm.nightlies.amd.com/{device.therock}", "rocm")
568568
rocm.refresh()
569569

570570
msg = f'ROCm: version={rocm.version}'
@@ -575,7 +575,7 @@ def prepare_environment():
575575
if backend == "rocm":
576576
if sys.platform == "win32":
577577
if isinstance(rocm.environment, rocm.PythonPackageEnvironment):
578-
torch_command = os.environ.get('TORCH_COMMAND', f'pip install torch torchvision --index-url https://rocm.nightlies.amd.com/v2-staging/{device.therock}')
578+
torch_command = os.environ.get('TORCH_COMMAND', f'pip install torch torchvision --index-url https://rocm.nightlies.amd.com/{device.therock}')
579579
else:
580580
torch_command = os.environ.get('TORCH_COMMAND', 'pip install --no-cache-dir https://repo.radeon.com/rocm/windows/rocm-rel-6.4.4/torch-2.8.0a0%2Bgitfc14c65-cp312-cp312-win_amd64.whl https://repo.radeon.com/rocm/windows/rocm-rel-6.4.4/torchvision-0.24.0a0%2Bc85f008-cp312-cp312-win_amd64.whl')
581581
else:

0 commit comments

Comments
 (0)