0

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?

1 Answers1

1

You can try with Custom Device Selector derived from device_selector class in DPCPP. It can be used when you want to select a desired GPU for offloading from a set of GPU types available in a system. Please refer to the Data Parallel C++ Page no: 45 for more details.

Do you have the latest graphics drivers in your system? Please try to install the latest graphics drivers in your system and let us know if the issue still persists. You could download it from the link below. https://www.intel.com/content/www/us/en/download/726609/intel-arc-iris-xe-graphics-whql-windows.html

  • Hi, I have seen your comment today. Currently I am working on verious sycl implementations. This week I have to investigate other sycl compilers excluding DPC++. However, I will try the constum device selector as soon as I can, and I will give you a feedback. To anwer your questions. Yes, I have the latest drivers. However, until now it seems I hadn't a back-end for targeting nvidia :D. Thank you for your support. – MoMellouky Apr 18 '23 at 07:47