check devices for the same SYCL platform rather than the same backend

This commit is contained in:
Ben Ashbaugh 2024-06-12 22:00:19 -07:00
parent 3704f33389
commit d38f1aecc5

View file

@ -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();