Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
5 Views

Intel(R) Graphics Driver is not detected

I have two GPUs Intel Graphic and Nvidia GPU.

devices.png

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.

device.png

Tags (1)
0 Kudos
1 Reply
Highlighted
Moderator
5 Views

Hi Nyan,

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

0 Kudos