From d38f1aecc5fac361c1b1b11678d52b55aed68159 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Wed, 12 Jun 2024 22:00:19 -0700 Subject: [PATCH] check devices for the same SYCL platform rather than the same backend --- ggml-sycl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ggml-sycl.cpp b/ggml-sycl.cpp index 483c03071..106a7f217 100644 --- a/ggml-sycl.cpp +++ b/ggml-sycl.cpp @@ -3307,7 +3307,7 @@ class sycl_gpu_mgr { void detect_sycl_gpu_list_with_max_cu() try { int device_count = dpct::dev_mgr::instance().device_count(); - sycl::backend backend; + sycl::platform platform; for (int id = 0; id < device_count; id++) { sycl::device device = dpct::dev_mgr::instance().get_device(id); @@ -3317,7 +3317,7 @@ class sycl_gpu_mgr { dpct::get_device_info(prop, device); if (max_compute_units < prop.get_max_compute_units()) { max_compute_units = prop.get_max_compute_units(); - backend = device.get_backend(); + platform = device.get_platform(); } } @@ -3328,7 +3328,7 @@ class sycl_gpu_mgr { dpct::device_info prop; dpct::get_device_info(prop, device); if (max_compute_units == prop.get_max_compute_units() && - backend == device.get_backend()) { + platform == device.get_platform()) { gpus.push_back(id); devices.push_back(device); work_group_size = prop.get_max_work_group_size();