- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have two GPUs Intel Graphic and Nvidia GPU.
My oneApi version is latest beta-05.
But when the device_selector code is run, it never detects GPUs.
class MyDeviceSelector : public cl::sycl::device_selector { public: MyDeviceSelector() {} // This is the function which gives a "rating" to devices. virtual int operator()(const cl::sycl::device& device) const override { // The template parameter to device.get_info can be a variety of properties // defined by the SYCL spec's cl::sycl::info:: enum. Properties may have // different types. Here we query name which is a string. const std::string name = device.get_info<cl::sycl::info::device::name>(); std::cout << "Trying device: " << name << "..." << std::endl; std::cout << " Vendor: " << device.get_info<cl::sycl::info::device::vendor>() << std::endl; if (device.is_gpu()) return 500; if (device.is_accelerator()) return 400; if (device.is_cpu()) return 300; if (device.is_host()) return 100; return -1; } };
The ouput from running through the above code is as follow.
Why GPU is not detected?
Before beta-05 is updated, it was able to detect GPU using beta-03.
- Tags:
- General Support
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nyan,
Thanks for reaching out to us.
As this is a duplicate thread, please refer to the below thread for more information.
https://software.intel.com/en-us/forums/intel-oneapi-base-toolkit/topic/851345
Regards
Goutham

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page