Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vulkan device id fix #2028

Merged
merged 1 commit into from
Dec 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/language_models/scripts/vicuna.py
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,10 @@ def get_model_path(self, suffix="mlir"):
self.vulkan_target_triple.split("-")[:-1]
)
differentiator = target_triple
else:
from shark.iree_utils.vulkan_utils import get_vulkan_triple_flag
tt = get_vulkan_triple_flag(device_num=self.device_id)
differentiator = "_" + "_".join(tt.split("=")[1].split('-')[:-1])

elif "rocm" == self.device:
from shark.iree_utils.gpu_utils import get_rocm_device_arch
Expand Down Expand Up @@ -2355,6 +2359,10 @@ def avg_and_stdev(data):
break
id += 1

if "://" in device :
from shark.iree_utils.compile_utils import clean_device_info
_, device_id = clean_device_info(args.device)

assert (
device_id
), f"no vulkan hardware for target-triple '{vulkan_target_triple}' exists"
Expand Down