From 58f194a450d72e932778a85172921c9b34debc9c Mon Sep 17 00:00:00 2001 From: Stefan Kapusniak <121311569+one-lithe-rune@users.noreply.github.com> Date: Mon, 18 Mar 2024 05:21:44 +0000 Subject: [PATCH] Fix _IREE_TARGET_MAP (#2103) - Change target passed to iree for vulkan from 'vulkan' to 'vulkan-spriv', as 'vulkan' is not a valid value for --iree-hal-target-backends with the current iree compiler. --- shark/iree_utils/_common.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/shark/iree_utils/_common.py b/shark/iree_utils/_common.py index 26dcf7c5b5..c58405b46e 100644 --- a/shark/iree_utils/_common.py +++ b/shark/iree_utils/_common.py @@ -91,7 +91,7 @@ def iree_target_map(device): "cpu-task": "llvm-cpu", "cpu-sync": "llvm-cpu", "cuda": "cuda", - "vulkan": "vulkan", + "vulkan": "vulkan-spirv", "metal": "metal", "rocm": "rocm", "intel-gpu": "opencl-spirv", @@ -122,9 +122,7 @@ def check_device_drivers(device): ) return True except RuntimeError as re: - print( - f"[ERR] Failed to get driver for {device} with error:\n{repr(re)}" - ) + print(f"[ERR] Failed to get driver for {device} with error:\n{repr(re)}") return True # Unknown device. We assume drivers are installed.