oneapi-src / unified-runtime

https://oneapi-src.github.io/unified-runtime/
Other
31 stars 108 forks source link

Add Missing `ur_device_affinity_domain_flag_t` Enumerations #115

Closed FranklandJack closed 1 year ago

FranklandJack commented 1 year ago

Issue

PI defines the pi_device_affinity_domain bitfield which can take the following values:

which are used here, here, here and here respectively in the DPC++ runtime.

Unified Runtime defines the ur_device_affinity_domain_flag_t enumeration but it is missing the above values.

Task

Add the missing enumerations from above to Unified Runtime so that it meets the requirements of the DPC++ runtime.

FranklandJack commented 1 year ago

There is a bit of a question of whether the DPC++ runtime actually needs to use these enumerations, see the comments on https://github.com/oneapi-src/unified-runtime/pull/132.

FranklandJack commented 1 year ago

Since these enumeration values aren't used outside the DPC++ codebase, it probably doesn't make sense to add them to UR and instead they should be pulled into the DPC++ headers so they can be reused in that codebase.

kbenzie commented 1 year ago

These enums are likely not required for UR.

I don't think I agree, they are required for the SYCL 2020 spec, see table 23.