Fix non-intel device selection
This commit is contained in:
parent
d8fd0ccf6a
commit
251e602d25
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue