mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
zluda downgrade torch on gcn cards
This commit is contained in:
+1
-1
@@ -514,7 +514,7 @@ def install_rocm_zluda():
|
||||
del args.device_id
|
||||
try:
|
||||
zluda_installer.load(zluda_path)
|
||||
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.3.0 torchvision --index-url https://download.pytorch.org/whl/cu118')
|
||||
torch_command = os.environ.get('TORCH_COMMAND', f'torch=={zluda_installer.get_default_torch_version(hip_default_device)} torchvision --index-url https://download.pytorch.org/whl/cu118')
|
||||
log.info(f'Using ZLUDA in {zluda_path}')
|
||||
except Exception as e:
|
||||
error = e
|
||||
|
||||
@@ -4,6 +4,7 @@ import ctypes
|
||||
import shutil
|
||||
import zipfile
|
||||
import urllib.request
|
||||
from typing import Optional
|
||||
from modules import rocm
|
||||
|
||||
|
||||
@@ -71,3 +72,12 @@ def load(zluda_path: os.PathLike) -> None:
|
||||
return os.path.join(cpp_extension.ROCM_HOME, *paths)
|
||||
cpp_extension._join_rocm_home = _join_rocm_home # pylint: disable=protected-access
|
||||
rocm.conceal = conceal
|
||||
|
||||
|
||||
def get_default_torch_version(agent: Optional[rocm.Agent]) -> str:
|
||||
if agent is not None:
|
||||
if agent.is_navi3x or agent.is_navi2x or agent.is_navi1x:
|
||||
return "2.3.1"
|
||||
elif agent.is_gcn:
|
||||
return "2.2.1"
|
||||
return "2.3.1"
|
||||
|
||||
Reference in New Issue
Block a user