From c6cd0723cf6e37e321e9150701854b79b101a951 Mon Sep 17 00:00:00 2001 From: Seunghoon Lee Date: Tue, 13 Aug 2024 15:03:25 +0900 Subject: [PATCH] hip_visible_devices --- installer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer.py b/installer.py index 63e8fb824..7ce4de203 100644 --- a/installer.py +++ b/installer.py @@ -502,6 +502,8 @@ def install_rocm_zluda(torch_command): error = e log.warning(f'Failed to install ZLUDA: {e}') if error is None: + if args.device_id is not None: + os.environ['HIP_VISIBLE_DEVICES'] = 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')