[clang] [llvm] [TargetParser] Add a list of Intel GPUs, and use it in offload-arch (PR #222072)

Nikita Kornev via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 16 09:52:30 PDT 2026


================
@@ -24,42 +24,25 @@
 namespace llvm {
 namespace IntelGPU {
 
-/// The Intel GPU architecture names this build knows, covering both physical
-/// devices and the compatibility names that stand for a whole product line.
-enum GPUKind : uint16_t {
+/// Intel GPU architecture names, covering both physical devices and the
+/// compatibility names that stand for a whole product line.
+enum GPUKind : uint8_t {
----------------
KornevNikita wrote:

Currently this enum contains ~40 entries. It seems to me we’ll need a couple of decades to add more than 255 entries, so `uint8_t` seems enough.

I've switched to `uint8_t` since other vendors use this type:
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/TargetParser/NVPTXTargetParser.h#L20
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/TargetParser/AMDGPUTargetParser.h#L35
Seems like this is some convention.


https://github.com/llvm/llvm-project/pull/222072


More information about the cfe-commits mailing list