mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
rocm wsl fix arch detection
This commit is contained in:
@@ -458,6 +458,10 @@ def install_rocm_zluda(torch_command):
|
||||
command = subprocess.run('hipinfo', shell=True, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
amd_gpus = command.stdout.decode(encoding="utf8", errors="ignore").split('\n')
|
||||
amd_gpus = [x.split(' ')[-1].strip() for x in amd_gpus if x.startswith('gcnArchName:')]
|
||||
elif os.environ.get('WSL_DISTRO_NAME', None) is not None: # WSL does not have 'rocm_agent_enumerator'
|
||||
command = subprocess.run('rocminfo', shell=True, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
amd_gpus = command.stdout.decode(encoding="utf8", errors="ignore").split('\n')
|
||||
amd_gpus = [x.strip().split(" ")[-1] for x in amd_gpus if x.startswith(' Name:') and "CPU" not in x]
|
||||
else:
|
||||
command = subprocess.run('rocm_agent_enumerator', shell=True, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
amd_gpus = command.stdout.decode(encoding="utf8", errors="ignore").split('\n')
|
||||
|
||||
@@ -52,8 +52,8 @@ def get_execution_provider_options():
|
||||
execution_provider_options = { "device_id": int(cmd_opts.device_id or 0) }
|
||||
if opts.onnx_execution_provider == ExecutionProvider.ROCm:
|
||||
if ExecutionProvider.ROCm in available_execution_providers:
|
||||
execution_provider_options["tunable_op_enable"] = 1
|
||||
execution_provider_options["tunable_op_tuning_enable"] = 1
|
||||
execution_provider_options["tunable_op_enable"] = True
|
||||
execution_provider_options["tunable_op_tuning_enable"] = True
|
||||
elif opts.onnx_execution_provider == ExecutionProvider.OpenVINO:
|
||||
from modules.intel.openvino import get_device as get_raw_openvino_device
|
||||
device = get_raw_openvino_device()
|
||||
|
||||
Reference in New Issue
Block a user