File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3451,7 +3451,7 @@ class sycl_gpu_mgr {
3451
3451
dpct::device_info prop;
3452
3452
dpct::get_device_info(prop, device);
3453
3453
if (max_compute_units == prop.get_max_compute_units() &&
3454
- prop.get_major_version() == 1 ) {
3454
+ is_ext_oneapi_device(device) ) {
3455
3455
gpus.push_back(id);
3456
3456
devices.push_back(device);
3457
3457
work_group_size = prop.get_max_work_group_size();
@@ -3484,6 +3484,15 @@ class sycl_gpu_mgr {
3484
3484
assert(false);
3485
3485
return -1;
3486
3486
}
3487
+
3488
+ bool is_ext_oneapi_device(const sycl::device &dev) {
3489
+ sycl::backend dev_backend = dev.get_backend();
3490
+ if (dev_backend == sycl::backend::ext_oneapi_level_zero ||
3491
+ dev_backend == sycl::backend::ext_oneapi_cuda ||
3492
+ dev_backend == sycl::backend::ext_oneapi_hip)
3493
+ return true;
3494
+ return false;
3495
+ }
3487
3496
};
3488
3497
3489
3498
static sycl_gpu_mgr *g_sycl_gpu_mgr = NULL;
You can’t perform that action at this time.
0 commit comments