I am currently working on a project using SYCL to apply an unsharp mask to an image. My machine has an NVIDIA and an Intel GPU inside it. I am starting with the following code:
default_selector deviceSelector;
queue myQueue(deviceSelector);
The issue is that the line of code "default_selector deviceSelector;" automatically grabs the NVIDIA GPU inside my machine, this breaks all the code that follows as SYCL does not work with NVIDIA.
Therefore my question is - how can I force "default_selector deviceSelector;" to get my Intel GPU and not the NVIDIA GPU? Perhaps I can say something like:
if (device.has_extension(cl::sycl::string_class("Intel")))
if (device.get_info<info::device::device_type>() == info::device_type::gpu)
then select this GPU;//pseudo code
Thus making the code skip over the NVIDIA GPU and guaranteeing the selecting of my Intel GPU.