Debian Codegraph @

gcc/config/gcn/gcn-devices.def

raw
1 /* Copyright (C) 2024-2025 Free Software Foundation, Inc.
2
3 This file is free software; you can redistribute it and/or modify it under
4 the terms of the GNU General Public License as published by the Free
5 Software Foundation; either version 3 of the License, or (at your option)
6 any later version.
7
8 This file is distributed in the hope that it will be useful, but WITHOUT
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with GCC; see the file COPYING3. If not see
15 <http://www.gnu.org/licenses/>. */
16
17 /* GCN Device Configurations.
18
19 This file contains all the device-specific information needed for both
20 GCC and Libgomp. Please respect the formatting and field comments as
21 this file is read by Awk scripts in addition to the C++ preprocessor.
22
23 To add a new device:
24 1. Add a new GCN_DEVICE instance below.
25 2. Add the name to the list in config.gcc.
26 3. Allow gcn-tables.opt to regenerate.
27 4. Implement target-specific metadata and new features using
28 PROCESSOR_<NAME> (or a new ISA feature flag).
29 5. Consider adding to the set of device-specific tests in the libgomp
30 testsuite.
31
32 New ISA variants are defined in gcn-opts.h. Please use the feature macros
33 in any conditionals, rather than depending on specific devices or ISAs
34 directly.
35
36 GCN_DEVICE field descriptions:
37 0 "name" (text, external)
38 Lower case device name used in -march=name, diagnostics,
39 assembler directives, etc.
40 1 "NAME" (text, external)
41 Upper case device name used in macros.
42 2 "ELF" (hex integer, external)
43 Magic number used assigned to this device for use in elf_flags.
44 3 "ISA" (enum gcn_isa, internal)
45 ISA variant for instruction selection, etc.
46 4 "XNACK default" (enum hsaco_attr_type, internal)
47 Default value for the -mattr=[-+]xnack setting. May need to correspond
48 to the assembler expectations for this device.
49 5 "SRAM_ECC default" (enum hsaco_attr_type, internal)
50 Default value for the -mattr=[-+]sram-ecc setting. Only really used
51 to ensure that the binary is in a known state mkoffload can match.
52 6 "WAVE64 mode" (enum hsaco_attr_type, internal)
53 Set "on" for devices where this needs to be configured, "unsupported"
54 otherwise (meaning no special treatment needed). GCC does not support
55 wave32 mode.
56 7 "CU mode" (enum hsaco_attr_type, internal)
57 Set "on" for devices that have this feature, "unsupported" otherwise
58 (meaning that CU mode is not optional on the device). GCC does not
59 support CU mode off.
60 8 "Max ISA VGPRs" (integer, internal)
61 Define how many registers there are in the VGPR register file, for the
62 purposes of calculating maximum occupancy. Some devices have AVGPRs
63 in the same register file, some have more registers than are
64 addressable from a single kernel. Used by libgomp's plugin-gcn.c.
65 9 "Generic Processor Version" (unsigned, external)
66 Used as version field for generic processor support. For non-generic
67 code it is 0; otherwise, between 1 and 255. Initially, it is 1 for
68 each generic device, but incremented (for a given generic device) if
69 an new device of that series requires a code change;
70 cf. EF_AMDGPU_GENERIC_VERSION_V. The version shall be the same as
71 generated by the used llvm-mc assembler.
72 10 "Architecture Family Name" (string, external)
73 Used to #define '__GFX<...>__'.
74 11 "GENERIC NAME" (text, external)
75 The name of the generic ISA this device is compatible with or "NONE",
76 where the generic name is the NAME (field 2) of the associated
77 generic device.
78
79 Fields marked "external", above, have values defined elsewhere (HSA, ROCM,
80 LLVM, ELF, etc.) and must have matching definitions here. Fields marked
81 "internal" are defined and used only in GCC (although some may have
82 user-visible effects) and may be refactored as needed. */
83
84 /* GCN GFX9 (Vega) */
85
86 GCN_DEVICE(gfx900, GFX900, 0x2c, ISA_GCN5,
87 /* XNACK default */ HSACO_ATTR_OFF,
88 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
89 /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
90 /* CU mode */ HSACO_ATTR_UNSUPPORTED,
91 /* Max ISA VGPRs */ 256,
92 /* Generic code obj version */ 0, /* non-generic */
93 /* Architecture Family */ GFX9,
94 /* Generic Name */ GFX9_GENERIC
95 )
96
97 GCN_DEVICE(gfx902, GFX902, 0x2d, ISA_GCN5,
98 /* XNACK default */ HSACO_ATTR_OFF,
99 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
100 /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
101 /* CU mode */ HSACO_ATTR_UNSUPPORTED,
102 /* Max ISA VGPRs */ 256,
103 /* Generic code obj version */ 0, /* non-generic */
104 /* Architecture Family */ GFX9,
105 /* Generic Name */ GFX9_GENERIC
106 )
107
108 GCN_DEVICE(gfx904, GFX904, 0x2e, ISA_GCN5,
109 /* XNACK default */ HSACO_ATTR_OFF,
110 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
111 /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
112 /* CU mode */ HSACO_ATTR_UNSUPPORTED,
113 /* Max ISA VGPRs */ 256,
114 /* Generic code obj version */ 0, /* non-generic */
115 /* Architecture Family */ GFX9,
116 /* Generic Name */ GFX9_GENERIC
117 )
118
119 GCN_DEVICE(gfx906, GFX906, 0x2f, ISA_GCN5,
120 /* XNACK default */ HSACO_ATTR_OFF,
121 /* SRAM_ECC default */ HSACO_ATTR_ANY,
122 /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
123 /* CU mode */ HSACO_ATTR_UNSUPPORTED,
124 /* Max ISA VGPRs */ 256,
125 /* Generic code obj version */ 0, /* non-generic */
126 /* Architecture Family */ GFX9,
127 /* Generic Name */ GFX9_GENERIC
128 )
129
130 GCN_DEVICE(gfx908, GFX908, 0x30, ISA_CDNA1,
131 /* XNACK default */ HSACO_ATTR_OFF,
132 /* SRAM_ECC default */ HSACO_ATTR_ANY,
133 /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
134 /* CU mode */ HSACO_ATTR_UNSUPPORTED,
135 /* Max ISA VGPRs */ 256,
136 /* Generic code obj version */ 0, /* non-generic */
137 /* Architecture Family */ GFX9,
138 /* Generic Name */ NONE
139 )
140
141 GCN_DEVICE(gfx909, GFX909, 0x31, ISA_GCN5,
142 /* XNACK default */ HSACO_ATTR_ANY,
143 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
144 /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
145 /* CU mode */ HSACO_ATTR_UNSUPPORTED,
146 /* Max ISA VGPRs */ 256,
147 /* Generic code obj version */ 0, /* non-generic */
148 /* Architecture Family */ GFX9,
149 /* Generic Name */ GFX9_GENERIC
150 )
151
152 GCN_DEVICE(gfx90a, GFX90A, 0x3f, ISA_CDNA2,
153 /* XNACK default */ HSACO_ATTR_ANY,
154 /* SRAM_ECC default */ HSACO_ATTR_ANY,
155 /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
156 /* CU mode */ HSACO_ATTR_UNSUPPORTED,
157 /* Max ISA VGPRs */ 512,
158 /* Generic code obj version */ 0, /* non-generic */
159 /* Architecture Family */ GFX9,
160 /* Generic Name */ NONE
161 )
162
163 GCN_DEVICE(gfx90c, GFX90C, 0x32, ISA_GCN5,
164 /* XNACK default */ HSACO_ATTR_ANY,
165 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
166 /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
167 /* CU mode */ HSACO_ATTR_UNSUPPORTED,
168 /* Max ISA VGPRs */ 256,
169 /* Generic code obj version */ 0, /* non-generic */
170 /* Architecture Family */ GFX9,
171 /* Generic Name */ GFX9_GENERIC
172 )
173
174 GCN_DEVICE(gfx9-generic, GFX9_GENERIC, 0x051, ISA_GCN5,
175 /* XNACK default */ HSACO_ATTR_ANY,
176 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
177 /* WAVE64 mode */ HSACO_ATTR_UNSUPPORTED,
178 /* CU mode */ HSACO_ATTR_UNSUPPORTED,
179 /* Max ISA VGPRs */ 256,
180 /* Generic code obj version */ 1,
181 /* Architecture Family */ GFX9,
182 /* Generic Name */ NONE
183 )
184
185 /* GCN GFX10.3 (RDNA 2) */
186
187 GCN_DEVICE(gfx1030, GFX1030, 0x36, ISA_RDNA2,
188 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
189 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
190 /* WAVE64 mode */ HSACO_ATTR_ON,
191 /* CU mode */ HSACO_ATTR_ON,
192 /* Max ISA VGPRs */ 512, /* 512 SIMD32 = 256 wavefrontsize64. */
193 /* Generic code obj version */ 0, /* non-generic */
194 /* Architecture Family */ GFX10,
195 /* Generic Name */ GFX10_3_GENERIC
196 )
197
198 GCN_DEVICE(gfx1031, GFX1031, 0x37, ISA_RDNA2,
199 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
200 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
201 /* WAVE64 mode */ HSACO_ATTR_ON,
202 /* CU mode */ HSACO_ATTR_ON,
203 /* Max ISA VGPRs */ 512, /* 512 SIMD32 = 256 wavefrontsize64. */
204 /* Generic code obj version */ 0, /* non-generic */
205 /* Architecture Family */ GFX10,
206 /* Generic Name */ GFX10_3_GENERIC
207 )
208
209 GCN_DEVICE(gfx1032, GFX1032, 0x38, ISA_RDNA2,
210 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
211 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
212 /* WAVE64 mode */ HSACO_ATTR_ON,
213 /* CU mode */ HSACO_ATTR_ON,
214 /* Max ISA VGPRs */ 512, /* 512 SIMD32 = 256 wavefrontsize64. */
215 /* Generic code obj version */ 0, /* non-generic */
216 /* Architecture Family */ GFX10,
217 /* Generic Name */ GFX10_3_GENERIC
218 )
219
220 GCN_DEVICE(gfx1033, GFX1033, 0x39, ISA_RDNA2,
221 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
222 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
223 /* WAVE64 mode */ HSACO_ATTR_ON,
224 /* CU mode */ HSACO_ATTR_ON,
225 /* Max ISA VGPRs */ 512, /* 512 SIMD32 = 256 wavefrontsize64. */
226 /* Generic code obj version */ 0, /* non-generic */
227 /* Architecture Family */ GFX10,
228 /* Generic Name */ GFX10_3_GENERIC
229 )
230
231 GCN_DEVICE(gfx1034, GFX1034, 0x3e, ISA_RDNA2,
232 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
233 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
234 /* WAVE64 mode */ HSACO_ATTR_ON,
235 /* CU mode */ HSACO_ATTR_ON,
236 /* Max ISA VGPRs */ 512, /* 512 SIMD32 = 256 wavefrontsize64. */
237 /* Generic code obj version */ 0, /* non-generic */
238 /* Architecture Family */ GFX10,
239 /* Generic Name */ GFX10_3_GENERIC
240 )
241
242 GCN_DEVICE(gfx1035, GFX1035, 0x3d, ISA_RDNA2,
243 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
244 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
245 /* WAVE64 mode */ HSACO_ATTR_ON,
246 /* CU mode */ HSACO_ATTR_ON,
247 /* Max ISA VGPRs */ 512, /* 512 SIMD32 = 256 wavefrontsize64. */
248 /* Generic code obj version */ 0, /* non-generic */
249 /* Architecture Family */ GFX10,
250 /* Generic Name */ GFX10_3_GENERIC
251 )
252
253 GCN_DEVICE(gfx1036, GFX1036, 0x45, ISA_RDNA2,
254 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
255 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
256 /* WAVE64 mode */ HSACO_ATTR_ON,
257 /* CU mode */ HSACO_ATTR_ON,
258 /* Max ISA VGPRs */ 512, /* 512 SIMD32 = 256 wavefrontsize64. */
259 /* Generic code obj version */ 0, /* non-generic */
260 /* Architecture Family */ GFX10,
261 /* Generic Name */ GFX10_3_GENERIC
262 )
263
264 GCN_DEVICE(gfx10-3-generic, GFX10_3_GENERIC, 0x053, ISA_RDNA2,
265 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
266 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
267 /* WAVE64 mode */ HSACO_ATTR_ON,
268 /* CU mode */ HSACO_ATTR_ON,
269 /* Max ISA VGPRs */ 512, /* 512 SIMD32 = 256 wavefrontsize64. */
270 /* Generic code obj version */ 1,
271 /* Architecture Family */ GFX10,
272 /* Generic Name */ NONE
273 )
274
275 /* GCN GFX11 (RDNA 3) */
276
277 GCN_DEVICE(gfx1100, GFX1100, 0x41, ISA_RDNA3,
278 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
279 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
280 /* WAVE64 mode */ HSACO_ATTR_ON,
281 /* CU mode */ HSACO_ATTR_ON,
282 /* Max ISA VGPRs */ 1536, /* 1536 SIMD32 = 768 wavefrontsize64. */
283 /* Generic code obj version */ 0, /* non-generic */
284 /* Architecture Family */ GFX11,
285 /* Generic Name */ GFX11_GENERIC
286 )
287
288 GCN_DEVICE(gfx1101, GFX1101, 0x46, ISA_RDNA3,
289 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
290 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
291 /* WAVE64 mode */ HSACO_ATTR_ON,
292 /* CU mode */ HSACO_ATTR_ON,
293 /* Max ISA VGPRs */ 1536,
294 /* Generic code obj version */ 0, /* non-generic */
295 /* Architecture Family */ GFX11,
296 /* Generic Name */ GFX11_GENERIC
297 )
298
299 GCN_DEVICE(gfx1102, GFX1102, 0x47, ISA_RDNA3,
300 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
301 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
302 /* WAVE64 mode */ HSACO_ATTR_ON,
303 /* CU mode */ HSACO_ATTR_ON,
304 /* Max ISA VGPRs */ 1536,
305 /* Generic code obj version */ 0, /* non-generic */
306 /* Architecture Family */ GFX11,
307 /* Generic Name */ GFX11_GENERIC
308 )
309
310 GCN_DEVICE(gfx1103, GFX1103, 0x44, ISA_RDNA3,
311 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
312 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
313 /* WAVE64 mode */ HSACO_ATTR_ON,
314 /* CU mode */ HSACO_ATTR_ON,
315 /* Max ISA VGPRs */ 1536,
316 /* Generic code obj version */ 0, /* non-generic */
317 /* Architecture Family */ GFX11,
318 /* Generic Name */ GFX11_GENERIC
319 )
320
321 GCN_DEVICE(gfx1150, GFX1150, 0x43, ISA_RDNA3,
322 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
323 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
324 /* WAVE64 mode */ HSACO_ATTR_ON,
325 /* CU mode */ HSACO_ATTR_ON,
326 /* Max ISA VGPRs */ 1536,
327 /* Generic code obj version */ 0, /* non-generic */
328 /* Architecture Family */ GFX11,
329 /* Generic Name */ GFX11_GENERIC
330 )
331
332 GCN_DEVICE(gfx1151, GFX1151, 0x4a, ISA_RDNA3,
333 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
334 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
335 /* WAVE64 mode */ HSACO_ATTR_ON,
336 /* CU mode */ HSACO_ATTR_ON,
337 /* Max ISA VGPRs */ 1536,
338 /* Generic code obj version */ 0, /* non-generic */
339 /* Architecture Family */ GFX11,
340 /* Generic Name */ GFX11_GENERIC
341 )
342
343 GCN_DEVICE(gfx1152, GFX1152, 0x55, ISA_RDNA3,
344 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
345 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
346 /* WAVE64 mode */ HSACO_ATTR_ON,
347 /* CU mode */ HSACO_ATTR_ON,
348 /* Max ISA VGPRs */ 1536,
349 /* Generic code obj version */ 0, /* non-generic */
350 /* Architecture Family */ GFX11,
351 /* Generic Name */ GFX11_GENERIC
352 )
353
354 GCN_DEVICE(gfx1153, GFX1153, 0x58, ISA_RDNA3,
355 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
356 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
357 /* WAVE64 mode */ HSACO_ATTR_ON,
358 /* CU mode */ HSACO_ATTR_ON,
359 /* Max ISA VGPRs */ 1536,
360 /* Generic code obj version */ 0, /* non-generic */
361 /* Architecture Family */ GFX11,
362 /* Generic Name */ GFX11_GENERIC
363 )
364
365 GCN_DEVICE(gfx11-generic, GFX11_GENERIC, 0x054, ISA_RDNA3,
366 /* XNACK default */ HSACO_ATTR_UNSUPPORTED,
367 /* SRAM_ECC default */ HSACO_ATTR_UNSUPPORTED,
368 /* WAVE64 mode */ HSACO_ATTR_ON,
369 /* CU mode */ HSACO_ATTR_ON,
370 /* Max ISA VGPRs */ 1536,
371 /* Generic code obj version */ 1,
372 /* Architecture Family */ GFX11,
373 /* Generic Name */ NONE
374 )
375
376 #undef GCN_DEVICE