================
@@ -34,6 +37,87 @@ enum GPUKind : uint8_t {
 #include "llvm/TargetParser/IntelGPUTargetParser.def"
 };
 
+/// Represents an IGCA feature set, including whether or not it is exact. The
+/// values are bitfields where the last bit represents exact. See IGCA Target
+/// representation below for more info.
+enum class IGCAFeatureSet : uint8_t {
+  Core = 0b000,
+  Compute = 0b010,
+  ComputeExact = 0b011,
+  Render = 0b100,
+  RenderExact = 0b101,
+};
+
+/// Wrapper around an IGCA target's uint32_t representation, packed using the
+/// following format:
+///
+///    31              16 15           3 2           1 0         0
+///   +------------------+--------------+-------------+-----------+
+///   |      Target      |   Reserved   | Feature set | Is Exact? |
+///   +------------------+--------------+-------------+-----------+
+///          16 bits         13 bits        2 bits        1 bit
----------------
srividya-sundaram wrote:

nit: the diagram labels bits `2–1` as `"Feature set"`, but in the code 
`IGCAFeatureSet, FeatureSetMask (0x7) and getFeatureSet()` all cover bits 
`2–0`, exact bit included. 

Could the diagram label bits` 2–0` as the feature set, with bit 0 as the exact 
flag, so the two match?

https://github.com/llvm/llvm-project/pull/227468
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to