diff --git a/installer.py b/installer.py index 9bfef9a77..e1e84be76 100644 --- a/installer.py +++ b/installer.py @@ -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') diff --git a/modules/onnx_impl/execution_providers.py b/modules/onnx_impl/execution_providers.py index aa1e7346c..641bf8720 100644 --- a/modules/onnx_impl/execution_providers.py +++ b/modules/onnx_impl/execution_providers.py @@ -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()