- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I write a SYCL application for which I need to distinguish between GPU discrete devices and GPU integrated devices. Is there any way, directly or indirectly, to know if the GPU device I selected (for example: by gpu_selector()) is discrete GPU or integrated GPU? I did not find an aspect for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your patience and understanding.
PCI ID can be used to determine whether the GPU is integrated or discrete.
Please find the attachment for the sample code(code.zip).
This code snippet will print the PCI Device id.
For example, the PCI ID of Intel® Data Center GPU Max 1100 is 0BDA. Complete list can be found here.
From this ID we can easily detect the type of the GPU. For this, a custom device selector can be used:
class DiscreteSelector : public sycl::device_selector {
public:
int operator()(const sycl::device &dev) const override {
string dg2_name = "OBDA"; //ID of the discrete gpu
string device_name = dev.get_info<sycl::info::device::name>();
return device_name == dg2_name ? 1 : -1;
}
};
If you still have any issues, please let us know.
Thanks & Regards,
Vankudothu Vaishnavi.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting on Intel communities.
We're looking into your question and will get back to you soon.
Thanks & Regards,
Vankudothu Vaishnavi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your patience and understanding.
PCI ID can be used to determine whether the GPU is integrated or discrete.
Please find the attachment for the sample code(code.zip).
This code snippet will print the PCI Device id.
For example, the PCI ID of Intel® Data Center GPU Max 1100 is 0BDA. Complete list can be found here.
From this ID we can easily detect the type of the GPU. For this, a custom device selector can be used:
class DiscreteSelector : public sycl::device_selector {
public:
int operator()(const sycl::device &dev) const override {
string dg2_name = "OBDA"; //ID of the discrete gpu
string device_name = dev.get_info<sycl::info::device::name>();
return device_name == dg2_name ? 1 : -1;
}
};
If you still have any issues, please let us know.
Thanks & Regards,
Vankudothu Vaishnavi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,
Vankudothu Vaishnavi.

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