@@ -17,186 +17,11 @@ inline namespace _V1 {
1717namespace ext ::oneapi::experimental {
1818
1919enum class architecture : uint64_t {
20- // If new element is added to this enum:
21- //
22- // Update
23- // - "detail::min_<category>_architecture" below if needed
24- // - "detail::max_<category>_architecture" below if needed
25- // - sycl_ext_oneapi_device_architecture specification doc
26- // - "-fsycl-targets" description in sycl/doc/UsersManual.md
27- //
28- // Add
29- // - new value for -fsycl-targets option to the compiler driver in
30- // accordance with changes from sycl/doc/UsersManual.md and update the
31- // compiler driver tests
32- // - ___SYCL_TARGET_<ARCH>__ to the compiler driver and to all places below
33- // - the unique ID of the new architecture to the SYCL RT source code to
34- // support querying the device architecture through
35- // device::get_info<ext::oneapi::experimental::info::device::architecture>
36- // - alias of architecture if this is Intel GPU architecture in format
37- // intel_gpu_<intel_gpu_arch_version>
38- //
39- // Important note about keeping architecture IDs below unique:
40- // - the architecture ID must be a hex number with 16 digits
41- // - the architecture ID must suit the following template:
42- // 0x AA BBBB CCCCCCCC DD (without spaces), where
43- // - AA is 2-digit ID of the architecture family which must be unique
44- // - BBBB is 4-digit number reserved for future modifications
45- // to keep uniqueness. It should be always 0000 for now
46- // - CCCCCCCC is 8-digit number of architecture itself. It must be
47- // unique for all architectures inside the family
48- // - DD is 2-digit number reserved for future unexpected modifications
49- // to keep uniqueness. It should be always 00 for now
50- //
51- unknown = 0x9900000000000000 ,
52- //
53- // Intel CPU architectures
54- //
55- // AA is 03,
56- // CCCCCCCC is the architecture ID from the DEVICE_IP_VERSION extension of
57- // underlied backend
58- // Note: CCCCCCCC for x86_64 consists of all zeros
59- x86_64 = 0x0300000000000000 ,
60- intel_cpu_spr = 0x0300000000000800 ,
61- intel_cpu_gnr = 0x0300000000000900 ,
62- //
63- // Intel GPU architectures
64- //
65- // AA is 00,
66- // CCCCCCCC is GMDID of that architecture
67- intel_gpu_bdw =
68- 0x0000000200000000 , // Intel(R) microarchitecture code name Broadwell
69- intel_gpu_skl =
70- 0x0000000240000900 , // Intel(R) microarchitecture code name Skylake
71- intel_gpu_kbl = 0x0000000240400900 , // Kaby Lake
72- intel_gpu_cfl = 0x0000000240800900 , // Coffee Lake
73- intel_gpu_apl = 0x0000000240c00000 , // Apollo Lake
74- intel_gpu_bxt = intel_gpu_apl, // Broxton
75- intel_gpu_glk = 0x0000000241000000 , // Gemini Lake
76- intel_gpu_whl = 0x0000000241400000 , // Whiskey Lake
77- intel_gpu_aml = 0x0000000241800000 , // Amber Lake
78- intel_gpu_cml = 0x0000000241c00000 , // Comet Lake
79- intel_gpu_icllp = 0x00000002c0000000 , // Ice Lake
80- intel_gpu_icl = intel_gpu_icllp, // Ice Lake
81- intel_gpu_ehl = 0x00000002c0800000 , // Elkhart Lake
82- intel_gpu_jsl = intel_gpu_ehl, // Jasper Lake
83- intel_gpu_tgllp = 0x0000000300000000 , // Tiger Lake
84- intel_gpu_tgl = intel_gpu_tgllp, // Tiger Lake
85- intel_gpu_rkl = 0x0000000300400000 , // Rocket Lake
86- intel_gpu_adl_s = 0x0000000300800000 , // Alder Lake S
87- intel_gpu_rpl_s = intel_gpu_adl_s, // Raptor Lake
88- intel_gpu_adl_p = 0x0000000300c00000 , // Alder Lake P
89- intel_gpu_adl_n = 0x0000000301000000 , // Alder Lake N
90- intel_gpu_dg1 = 0x0000000302800000 , // DG1
91- intel_gpu_acm_g10 = 0x000000030dc00800 , // Alchemist G10
92- intel_gpu_dg2_g10 = intel_gpu_acm_g10, // Alchemist G10
93- intel_gpu_acm_g11 = 0x000000030e000500 , // Alchemist G11
94- intel_gpu_dg2_g11 = intel_gpu_acm_g11, // Alchemist G11
95- intel_gpu_acm_g12 = 0x000000030e400000 , // Alchemist G12
96- intel_gpu_dg2_g12 = intel_gpu_acm_g12, // Alchemist G12
97- intel_gpu_pvc = 0x000000030f000700 , // Ponte Vecchio
98- intel_gpu_pvc_vg = 0x000000030f400700 , // Ponte Vecchio VG
99- intel_gpu_mtl_u = 0x0000000311800400 , // Meteor Lake U
100- intel_gpu_mtl_s = intel_gpu_mtl_u, // Meteor Lake S
101- intel_gpu_arl_u = intel_gpu_mtl_u, // Arrow Lake U
102- intel_gpu_arl_s = intel_gpu_mtl_u, // Arrow Lake S
103- intel_gpu_mtl_h = 0x0000000311c00400 , // Meteor Lake H
104- intel_gpu_arl_h = 0x0000000312800400 , // Arrow Lake H
105- intel_gpu_bmg_g21 = 0x0000000500400400 , // Battlemage G21
106- intel_gpu_lnl_m = 0x0000000501000400 , // Lunar Lake
107- //
108- // NVIDIA architectures
109- //
110- // AA is 01,
111- // CCCCCCCC is the SM version ID of that architecture
112- nvidia_gpu_sm_50 = 0x0100000000005000 ,
113- nvidia_gpu_sm_52 = 0x0100000000005200 ,
114- nvidia_gpu_sm_53 = 0x0100000000005300 ,
115- nvidia_gpu_sm_60 = 0x0100000000006000 ,
116- nvidia_gpu_sm_61 = 0x0100000000006100 ,
117- nvidia_gpu_sm_62 = 0x0100000000006200 ,
118- nvidia_gpu_sm_70 = 0x0100000000007000 ,
119- nvidia_gpu_sm_72 = 0x0100000000007200 ,
120- nvidia_gpu_sm_75 = 0x0100000000007500 ,
121- nvidia_gpu_sm_80 = 0x0100000000008000 ,
122- nvidia_gpu_sm_86 = 0x0100000000008600 ,
123- nvidia_gpu_sm_87 = 0x0100000000008700 ,
124- nvidia_gpu_sm_89 = 0x0100000000008900 ,
125- nvidia_gpu_sm_90 = 0x0100000000009000 ,
126- nvidia_gpu_sm_90a = 0x01000000000090a0 ,
127- //
128- // AMD architectures
129- //
130- // AA is 02,
131- // CCCCCCCC is the GFX version ID of that architecture
132- amd_gpu_gfx700 = 0x0200000000070000 ,
133- amd_gpu_gfx701 = 0x0200000000070100 ,
134- amd_gpu_gfx702 = 0x0200000000070200 ,
135- amd_gpu_gfx801 = 0x0200000000080100 ,
136- amd_gpu_gfx802 = 0x0200000000080200 ,
137- amd_gpu_gfx803 = 0x0200000000080300 ,
138- amd_gpu_gfx805 = 0x0200000000080500 ,
139- amd_gpu_gfx810 = 0x0200000000081000 ,
140- amd_gpu_gfx900 = 0x0200000000090000 ,
141- amd_gpu_gfx902 = 0x0200000000090200 ,
142- amd_gpu_gfx904 = 0x0200000000090400 ,
143- amd_gpu_gfx906 = 0x0200000000090600 ,
144- amd_gpu_gfx908 = 0x0200000000090800 ,
145- amd_gpu_gfx909 = 0x0200000000090900 ,
146- amd_gpu_gfx90a = 0x0200000000090a00 ,
147- amd_gpu_gfx90c = 0x0200000000090c00 ,
148- amd_gpu_gfx940 = 0x0200000000094000 ,
149- amd_gpu_gfx941 = 0x0200000000094100 ,
150- amd_gpu_gfx942 = 0x0200000000094200 ,
151- amd_gpu_gfx1010 = 0x0200000000101000 ,
152- amd_gpu_gfx1011 = 0x0200000000101100 ,
153- amd_gpu_gfx1012 = 0x0200000000101200 ,
154- amd_gpu_gfx1013 = 0x0200000000101300 ,
155- amd_gpu_gfx1030 = 0x0200000000103000 ,
156- amd_gpu_gfx1031 = 0x0200000000103100 ,
157- amd_gpu_gfx1032 = 0x0200000000103200 ,
158- amd_gpu_gfx1033 = 0x0200000000103300 ,
159- amd_gpu_gfx1034 = 0x0200000000103400 ,
160- amd_gpu_gfx1035 = 0x0200000000103500 ,
161- amd_gpu_gfx1036 = 0x0200000000103600 ,
162- amd_gpu_gfx1100 = 0x0200000000110000 ,
163- amd_gpu_gfx1101 = 0x0200000000110100 ,
164- amd_gpu_gfx1102 = 0x0200000000110200 ,
165- amd_gpu_gfx1103 = 0x0200000000110300 ,
166- amd_gpu_gfx1150 = 0x0200000000115000 ,
167- amd_gpu_gfx1151 = 0x0200000000115100 ,
168- amd_gpu_gfx1200 = 0x0200000000120000 ,
169- amd_gpu_gfx1201 = 0x0200000000120100 ,
170- //
171- // Aliases for Intel graphics architectures
172- //
173- intel_gpu_8_0_0 = intel_gpu_bdw,
174- intel_gpu_9_0_9 = intel_gpu_skl,
175- intel_gpu_9_1_9 = intel_gpu_kbl,
176- intel_gpu_9_2_9 = intel_gpu_cfl,
177- intel_gpu_9_3_0 = intel_gpu_apl,
178- intel_gpu_9_4_0 = intel_gpu_glk,
179- intel_gpu_9_5_0 = intel_gpu_whl,
180- intel_gpu_9_6_0 = intel_gpu_aml,
181- intel_gpu_9_7_0 = intel_gpu_cml,
182- intel_gpu_11_0_0 = intel_gpu_icllp,
183- intel_gpu_11_2_0 = intel_gpu_ehl,
184- intel_gpu_12_0_0 = intel_gpu_tgllp,
185- intel_gpu_12_1_0 = intel_gpu_rkl,
186- intel_gpu_12_2_0 = intel_gpu_adl_s,
187- intel_gpu_12_3_0 = intel_gpu_adl_p,
188- intel_gpu_12_4_0 = intel_gpu_adl_n,
189- intel_gpu_12_10_0 = intel_gpu_dg1,
190- intel_gpu_12_55_8 = intel_gpu_acm_g10,
191- intel_gpu_12_56_5 = intel_gpu_acm_g11,
192- intel_gpu_12_57_0 = intel_gpu_acm_g12,
193- intel_gpu_12_60_7 = intel_gpu_pvc,
194- intel_gpu_12_61_7 = intel_gpu_pvc_vg,
195- intel_gpu_12_70_4 = intel_gpu_mtl_u,
196- intel_gpu_12_71_4 = intel_gpu_mtl_h,
197- intel_gpu_12_74_4 = intel_gpu_arl_h,
198- intel_gpu_20_1_4 = intel_gpu_bmg_g21,
199- intel_gpu_20_4_4 = intel_gpu_lnl_m,
20+ #define __SYCL_ARCHITECTURE (NAME, VAL ) NAME = VAL,
21+ #define __SYCL_ARCHITECTURE_ALIAS (NAME, VAL ) NAME = VAL,
22+ #include < sycl/ext/oneapi/experimental/architectures.def>
23+ #undef __SYCL_ARCHITECTURE
24+ #undef __SYCL_ARCHITECTURE_ALIAS
20025};
20126
20227enum class arch_category {
0 commit comments