From 251e602d255a4f422a009640cfb65890b1ee7cdc Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 13 Mar 2024 15:26:49 +0000 Subject: [PATCH 1/3] Fix non-intel device selection --- ggml-sycl.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ggml-sycl.cpp b/ggml-sycl.cpp index c2ab13034ba85..cc4c06fc8de31 100644 --- a/ggml-sycl.cpp +++ b/ggml-sycl.cpp @@ -3451,7 +3451,7 @@ class sycl_gpu_mgr { dpct::device_info prop; dpct::get_device_info(prop, device); if (max_compute_units == prop.get_max_compute_units() && - prop.get_major_version() == 1) { + can_support_multi_gpu(device)) { gpus.push_back(id); devices.push_back(device); work_group_size = prop.get_max_work_group_size(); @@ -3484,6 +3484,15 @@ class sycl_gpu_mgr { assert(false); return -1; } + + bool can_support_multi_gpu(const sycl::device &dev) { + sycl::backend dev_backend = dev.get_backend(); + if (dev_backend == sycl::backend::ext_oneapi_level_zero || + dev_backend == sycl::backend::ext_oneapi_cuda || + dev_backend == sycl::backend::ext_oneapi_hip) + return true; + return false; + } }; static sycl_gpu_mgr *g_sycl_gpu_mgr = NULL; From 5e904ed8f2b05d1312e1cbeaea28e3bb00fa81f7 Mon Sep 17 00:00:00 2001 From: Abhilash Majumder <30946547+abhilash1910@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:27:25 +0530 Subject: [PATCH 2/3] Update ggml-sycl.cpp Co-authored-by: Neo Zhang Jianyu --- ggml-sycl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml-sycl.cpp b/ggml-sycl.cpp index cc4c06fc8de31..4e7a22a2af855 100644 --- a/ggml-sycl.cpp +++ b/ggml-sycl.cpp @@ -3451,7 +3451,7 @@ class sycl_gpu_mgr { dpct::device_info prop; dpct::get_device_info(prop, device); if (max_compute_units == prop.get_max_compute_units() && - can_support_multi_gpu(device)) { + is_ext_oneapi_device(device)) { gpus.push_back(id); devices.push_back(device); work_group_size = prop.get_max_work_group_size(); From 3a801e2752bc40bd037ba472da419227c964a6da Mon Sep 17 00:00:00 2001 From: Abhilash Majumder <30946547+abhilash1910@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:27:32 +0530 Subject: [PATCH 3/3] Update ggml-sycl.cpp Co-authored-by: Neo Zhang Jianyu --- ggml-sycl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml-sycl.cpp b/ggml-sycl.cpp index 4e7a22a2af855..3ec138e9b1ff0 100644 --- a/ggml-sycl.cpp +++ b/ggml-sycl.cpp @@ -3485,7 +3485,7 @@ class sycl_gpu_mgr { return -1; } - bool can_support_multi_gpu(const sycl::device &dev) { + bool is_ext_oneapi_device(const sycl::device &dev) { sycl::backend dev_backend = dev.get_backend(); if (dev_backend == sycl::backend::ext_oneapi_level_zero || dev_backend == sycl::backend::ext_oneapi_cuda ||