[llvm] [Offload] Define additional device info properties (PR #152533)
Callum Fare via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 8 09:25:10 PDT 2025
================
@@ -34,9 +34,41 @@ def DeviceInfo : Enum {
TaggedEtor<"DRIVER_VERSION", "char[]", "Driver version">,
TaggedEtor<"MAX_WORK_GROUP_SIZE", "uint32_t", "Maximum total work group size in work items">,
TaggedEtor<"MAX_WORK_GROUP_SIZE_PER_DIMENSION", "ol_dimensions_t", "Maximum work group size in each dimension">,
+ TaggedEtor<"VENDOR_ID", "uint32_t", "A unique vendor device identifier assigned by PCI-SIG">,
+ TaggedEtor<"NUM_COMPUTE_UNITS", "uint32_t", "The number of parallel compute units available to the device">,
+ TaggedEtorTemplate<"%TEMPLATE%_FP_CONFIG", "ol_device_fp_capability_flags_t", "%TEMPLATE% precision floating point capability", ["Single","Half","Double"]>,
----------------
callumfare wrote:
I'm genuinely not sure since I haven't touched the tablegen stuff in ages, but is it possible to use `foreach` to define multiple `TaggedEtor`s instead of defining this new templated etor type? It would simplify our tablegen backends a bit not having to loop over the template values in a few places.
Not a big deal to me though, just a thought in case you want to look into it.
https://github.com/llvm/llvm-project/pull/152533
More information about the llvm-commits
mailing list