-
Notifications
You must be signed in to change notification settings - Fork 794
Labels
Description
UR_DEVICE_TYPE_ALL doesn't fit properly with the use of the device_types enum. In most instances, vectors of device types are handled and edge cases are written into the code to support UR_DEVICE_TYPE_ALL.
For example, see
llvm/unified-runtime/source/loader/ur_adapter_registry.hpp
Lines 64 to 67 in d865c0c
| // If the adapter can report all device types then it matches. | |
| if (std::find(manifest.device_types.begin(), manifest.device_types.end(), | |
| UR_DEVICE_TYPE_ALL) != manifest.device_types.end()) { | |
| return true; |
This has implications in the instance where this enum is extended for further device types. The use of this throughout should be investigated and if possible, deprecated in favor of vectors containing explicit device types.