[SYCL] Update sycl_ext_intel_device_info with querying the device IP version - #23185
dm-vodopyanov wants to merge 1 commit into
Conversation
sycl_ext_intel_device_info with quering the device IP versionsycl_ext_intel_device_info with querying the device IP version
|
|
||
| _Returns:_ The IP version of the device. The meaning of the device IP version | ||
| is implementation-defined, but newer devices should have a higher version than | ||
| older devices. |
There was a problem hiding this comment.
I think we should document what this number means for Intel GPUs. In the mid-to-long term, I want to create a public document with this information. For now, I think we can point to this public header:
https://github.com/intel/compute-runtime/blob/master/third_party/aot_config_headers/platforms.h
And say something like:
Returns: The IP version of the device. For a GPU device, refer to the
PRODUCT_CONFIGenumeration in this header for a mapping between IP versions to device names.
I also think we should provide some way to decompose the uint32_t into the "major", "minor", and "patch" components. I can think of two ways to do this:
- Change the
return_typeinto a union like:union { std::uint32_t raw; struct { std::uint32_t patch:14; std::uint32_t minor:8; std::uint32_t major:10; }; }; - Provide three
inlinefunction that each take auint32_tand return one of the components.
I think (1) is not guaranteed to work if we care about portability between little-endian and big-endian host systems. However, Intel devices are all little-endian, so maybe this doesn't matter. Option (2) is guaranteed to be portable, but is a bit more verbose. Option (2) seems safer to me, but I'm open.
CC: @bashbaug also to verify that "major", "minor", "patch" are the right names for these three components. I'm also not certain of the bit widths of these three components, so maybe Ben can verify this too.
No description provided.