Replies: 1 comment 6 replies
-
Hi @yinrun,
This is for sure possible, just take a look at constructors available for
That is because you are likely using default selector - it indeed contains some hardcoded logic which favors GPUs. However, there are other selectors available according to the spec and you can even create your own: int prefer_my_vendor(const sycl::device & d) {
// Return 1 if the vendor name is "MyVendor" or 0 else.
// 0 does not prevent another device to be picked as a second choice
return d.get_info<info::device::vendor>() == "MyVendor";
}
// Get the preferred device or another one if not available
sycl::device preferred_device { prefer_my_vendor }; The example is copied from the spec section I linked above. Let me know if you other questions |
Beta Was this translation helpful? Give feedback.
-
Hi all. I am working on a server with multiple accelerator devices such as GPUs. When I as creating several sycl queues, I want to assign each queue to the specific GPU device I assigned. In cuda, we can use
cudaSetDevice
to choose the specific device , in dpc++ runtime, the selection seems to be made indevice_selector::select_device()
and it will select a default gpu device, how can I bind different queue to different accelerators respectively?Beta Was this translation helpful? Give feedback.
All reactions