Currently I am working in a projet using DPC++. I have worked for a while in the Intel DevCloud. I haven't any problem using computing ressources. When I select a gpu, it works as expected. However, for privacy reasons I need to run sycl code in my machine. So I have installed the Intel oneApi base ToolKit. Compiling the code works fine, the problem arises when I need to offload my kernel in the GPU. I declare my queue as follow:
sycl::queue q(sycl::gpu_selector_v);
I am using gpu_selector_v in my code because the gpu_selector{} is depricated.
This line of code throws a runtime exception with the following message:
**No device of requested type 'info::device_type::gpu' available. Please check https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements.html -1 (PI_ERROR_DEVICE_NOT_FOUND)
**
In fact, in addition to the integrated Intel Iris xe, I have a NVIDIA GeForce MX450. Therefore, I think sycl selector should select the nvidia gpu (In the worst cases, it should select the iris xe GPU).
While trying to troubleshoot the problem, I tought the issue is related to nvidia drivers, so I installed nvidia drivers (using software & updates in ubuntu 22.04 lts). Unfortunalty, the issue still exists. Then, I tried to query the available devices. I have done this using the following code
#include <CL/sycl.hpp>
int main()
{
for (auto platform : sycl::platform::get_platforms())
{
std::cout << "Platform: "
<< platform.get_info<sycl::info::platform::name>()
<< std::endl;
for (auto device : platform.get_devices())
{
std::cout << "\tDevice: "
<< device.get_info<sycl::info::device::name>()
<< std::endl;
}
}
sycl::queue q(sycl::gpu_selector_v);
std::cout << "Running on Device: " << q.get_device().get_info<sycl::info::device::name>();
}
The output of the above code is the following: Platform: Intel(R) FPGA Emulation Platform for OpenCL(TM) Device: Intel(R) FPGA Emulation Device Platform: Intel(R) OpenCL Device: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz terminate called after throwing an instance of 'sycl::_V1::runtime_error' what(): No device of requested type 'info::device_type::gpu' available. Please check https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements.html -1 (PI_ERROR_DEVICE_NOT_FOUND) Aborted (core dumped)
Addition information. they may be useful:
- During the installation of oneapi base toolkit. I have not installed the v-tune and the advisor (Because I don't need them at the moment, and the are huge).
- I have not tried the same code in windows (I am running a dual boot [ubuntu 22.04, windows 10])
My question is : what am I missing here ? Why the selector is not able to find my gpu?