Quantcast
Channel: SYCL GPU device query - Is the GPU device is discrete or integtated? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by aland for SYCL GPU device query - Is the GPU device is discrete or integtated?

$
0
0

As you observed, there are no dedicated aspect or property.

With Intel oneAPI, you can query (deprecated, but still working) info::device::host_unified_memory device property. I verified with oneAPI 2024.0 that it works for integrated and discreet Intel GPUs; and, based on the source code, it should work like this for NVIDIA and AMD GPUs too. But it is an implementation detail and is not guaranteed to behave like this in any future releases.

I don't see a way to do this with AdaptiveCpp / hipSYCL: the host_unified_memory property is always false for CUDA/HIP/OpenCL devices.

Another option with oneAPI is querying sycl::ext::intel::info::device::device_id property to get a PCI Device ID for Intel GPU. This can later be checked against the official device list. However, this will not work for NVIDIA or AMD GPUs. But, at this point, it might be easier to simply search the device name for keywords :)


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>