DPC++ Runtime
Runtime libraries for oneAPI DPC++
device_architecture.hpp
Go to the documentation of this file.
1 //===- device_architecture.hpp --------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
11 #include <cstdint> // for uint64_t
12 #include <optional>
13 #include <utility> // for std::integer_sequence
14 
15 namespace sycl {
16 inline namespace _V1 {
17 namespace ext::oneapi::experimental {
18 
19 enum 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  // - __SYCL_TARGET_<ARCH>__ to the compiler driver and to all places below
30  // - the unique ID of the new architecture in SYCL RT source code to support
31  // querying the device architecture
32  //
33  // Important note about keeping architecture IDs below unique:
34  // - the architecture ID must be a hex number with 16 digits
35  // - the architecture ID must suit the following template:
36  // 0x AA BBBB CCCCCCCC DD (without spaces), where
37  // - AA is 2-digit ID of the architecture family which must be unique
38  // - BBBB is 4-digit number reserved for future modifications
39  // to keep uniqueness. It should be always 0000 for now
40  // - CCCCCCCC is 8-digit number of architecture itself. It must be
41  // unique for all architectures inside the family
42  // - DD is 2-digit number reserved for future unexpected modifications
43  // to keep uniqueness. It should be always 00 for now
44  //
45  x86_64 = 0x9900000000000000,
46  //
47  // Intel CPU architectures
48  //
49  // AA is 03,
50  // CCCCCCCC is the architecture ID from the DEVICE_IP_VERSION extension of
51  // underlied backend
52  intel_cpu_spr = 0x0300000000000800,
53  intel_cpu_gnr = 0x0300000000000900,
54  //
55  // Intel GPU architectures
56  //
57  // AA is 00,
58  // CCCCCCCC is GMDID of that architecture
59  intel_gpu_bdw = 0x0000000200000000,
60  intel_gpu_skl = 0x0000000240000900,
61  intel_gpu_kbl = 0x0000000240400900,
62  intel_gpu_cfl = 0x0000000240800900,
63  intel_gpu_apl = 0x0000000240c00000,
65  intel_gpu_glk = 0x0000000241000000,
66  intel_gpu_whl = 0x0000000241400000,
67  intel_gpu_aml = 0x0000000241800000,
68  intel_gpu_cml = 0x0000000241c00000,
69  intel_gpu_icllp = 0x00000002c0000000,
70  intel_gpu_ehl = 0x00000002c0800000,
72  intel_gpu_tgllp = 0x0000000300000000,
73  intel_gpu_rkl = 0x0000000300400000,
74  intel_gpu_adl_s = 0x0000000300800000,
76  intel_gpu_adl_p = 0x0000000300c00000,
77  intel_gpu_adl_n = 0x0000000301000000,
78  intel_gpu_dg1 = 0x0000000302800000,
79  intel_gpu_acm_g10 = 0x000000030dc00800,
81  intel_gpu_acm_g11 = 0x000000030e000500,
83  intel_gpu_acm_g12 = 0x000000030e400000,
85  intel_gpu_pvc = 0x000000030f000700,
86  intel_gpu_pvc_vg = 0x000000030f400700,
87  //
88  // NVIDIA architectures
89  //
90  // AA is 01,
91  // CCCCCCCC is the SM version ID of that architecture
92  nvidia_gpu_sm_50 = 0x0100000000005000,
93  nvidia_gpu_sm_52 = 0x0100000000005200,
94  nvidia_gpu_sm_53 = 0x0100000000005300,
95  nvidia_gpu_sm_60 = 0x0100000000006000,
96  nvidia_gpu_sm_61 = 0x0100000000006100,
97  nvidia_gpu_sm_62 = 0x0100000000006200,
98  nvidia_gpu_sm_70 = 0x0100000000007000,
99  nvidia_gpu_sm_72 = 0x0100000000007200,
100  nvidia_gpu_sm_75 = 0x0100000000007500,
101  nvidia_gpu_sm_80 = 0x0100000000008000,
102  nvidia_gpu_sm_86 = 0x0100000000008600,
103  nvidia_gpu_sm_87 = 0x0100000000008700,
104  nvidia_gpu_sm_89 = 0x0100000000008900,
105  nvidia_gpu_sm_90 = 0x0100000000009000,
106  //
107  // AMD architectures
108  //
109  // AA is 02,
110  // CCCCCCCC is the GFX version ID of that architecture
111  amd_gpu_gfx700 = 0x0200000000070000,
112  amd_gpu_gfx701 = 0x0200000000070100,
113  amd_gpu_gfx702 = 0x0200000000070200,
114  amd_gpu_gfx801 = 0x0200000000080100,
115  amd_gpu_gfx802 = 0x0200000000080200,
116  amd_gpu_gfx803 = 0x0200000000080300,
117  amd_gpu_gfx805 = 0x0200000000080500,
118  amd_gpu_gfx810 = 0x0200000000081000,
119  amd_gpu_gfx900 = 0x0200000000090000,
120  amd_gpu_gfx902 = 0x0200000000090200,
121  amd_gpu_gfx904 = 0x0200000000090400,
122  amd_gpu_gfx906 = 0x0200000000090600,
123  amd_gpu_gfx908 = 0x0200000000090800,
124  amd_gpu_gfx909 = 0x0200000000090900,
125  amd_gpu_gfx90a = 0x0200000000090a00,
126  amd_gpu_gfx90c = 0x0200000000090c00,
127  amd_gpu_gfx940 = 0x0200000000094000,
128  amd_gpu_gfx941 = 0x0200000000094100,
129  amd_gpu_gfx942 = 0x0200000000094200,
130  amd_gpu_gfx1010 = 0x0200000000101000,
131  amd_gpu_gfx1011 = 0x0200000000101100,
132  amd_gpu_gfx1012 = 0x0200000000101200,
133  amd_gpu_gfx1013 = 0x0200000000101300,
134  amd_gpu_gfx1030 = 0x0200000000103000,
135  amd_gpu_gfx1031 = 0x0200000000103100,
136  amd_gpu_gfx1032 = 0x0200000000103200,
137  amd_gpu_gfx1033 = 0x0200000000103300,
138  amd_gpu_gfx1034 = 0x0200000000103400,
139  amd_gpu_gfx1035 = 0x0200000000103500,
140  amd_gpu_gfx1036 = 0x0200000000103600,
141  amd_gpu_gfx1100 = 0x0200000000110000,
142  amd_gpu_gfx1101 = 0x0200000000110100,
143  amd_gpu_gfx1102 = 0x0200000000110200,
144  amd_gpu_gfx1103 = 0x0200000000110300,
145  amd_gpu_gfx1150 = 0x0200000000115000,
146  amd_gpu_gfx1151 = 0x0200000000115100,
147  amd_gpu_gfx1200 = 0x0200000000120000,
148  amd_gpu_gfx1201 = 0x0200000000120100,
161 };
162 
163 enum class arch_category {
164  // If new element is added to this enum:
165  //
166  // Add
167  // - "detail::min_<new_category>_architecture" variable below
168  // - "detail::max_<new_category>_architecture" variable below
169  //
170  // Update
171  // - "detail::get_category_min_architecture()" function below
172  // - "detail::get_category_max_architecture()" function below
173  // - "detail::get_device_architecture_category()" function below
174  // - sycl_ext_oneapi_device_architecture specification doc
175  //
176  intel_gpu = 0,
177  nvidia_gpu = 1,
178  amd_gpu = 2,
179  // TODO: add intel_cpu = 3,
180 };
181 
182 } // namespace ext::oneapi::experimental
183 
184 namespace detail {
185 
192 
199 
206 
207 #ifndef __SYCL_TARGET_INTEL_X86_64__
208 #define __SYCL_TARGET_INTEL_X86_64__ 0
209 #endif
210 #ifndef __SYCL_TARGET_INTEL_GPU_BDW__
211 #define __SYCL_TARGET_INTEL_GPU_BDW__ 0
212 #endif
213 #ifndef __SYCL_TARGET_INTEL_GPU_SKL__
214 #define __SYCL_TARGET_INTEL_GPU_SKL__ 0
215 #endif
216 #ifndef __SYCL_TARGET_INTEL_GPU_KBL__
217 #define __SYCL_TARGET_INTEL_GPU_KBL__ 0
218 #endif
219 #ifndef __SYCL_TARGET_INTEL_GPU_CFL__
220 #define __SYCL_TARGET_INTEL_GPU_CFL__ 0
221 #endif
222 #ifndef __SYCL_TARGET_INTEL_GPU_APL__
223 #define __SYCL_TARGET_INTEL_GPU_APL__ 0
224 #endif
225 #ifndef __SYCL_TARGET_INTEL_GPU_GLK__
226 #define __SYCL_TARGET_INTEL_GPU_GLK__ 0
227 #endif
228 #ifndef __SYCL_TARGET_INTEL_GPU_WHL__
229 #define __SYCL_TARGET_INTEL_GPU_WHL__ 0
230 #endif
231 #ifndef __SYCL_TARGET_INTEL_GPU_AML__
232 #define __SYCL_TARGET_INTEL_GPU_AML__ 0
233 #endif
234 #ifndef __SYCL_TARGET_INTEL_GPU_CML__
235 #define __SYCL_TARGET_INTEL_GPU_CML__ 0
236 #endif
237 #ifndef __SYCL_TARGET_INTEL_GPU_ICLLP__
238 #define __SYCL_TARGET_INTEL_GPU_ICLLP__ 0
239 #endif
240 #ifndef __SYCL_TARGET_INTEL_GPU_EHL__
241 #define __SYCL_TARGET_INTEL_GPU_EHL__ 0
242 #endif
243 #ifndef __SYCL_TARGET_INTEL_GPU_TGLLP__
244 #define __SYCL_TARGET_INTEL_GPU_TGLLP__ 0
245 #endif
246 #ifndef __SYCL_TARGET_INTEL_GPU_RKL__
247 #define __SYCL_TARGET_INTEL_GPU_RKL__ 0
248 #endif
249 #ifndef __SYCL_TARGET_INTEL_GPU_ADL_S__
250 #define __SYCL_TARGET_INTEL_GPU_ADL_S__ 0
251 #endif
252 #ifndef __SYCL_TARGET_INTEL_GPU_ADL_P__
253 #define __SYCL_TARGET_INTEL_GPU_ADL_P__ 0
254 #endif
255 #ifndef __SYCL_TARGET_INTEL_GPU_ADL_N__
256 #define __SYCL_TARGET_INTEL_GPU_ADL_N__ 0
257 #endif
258 #ifndef __SYCL_TARGET_INTEL_GPU_DG1__
259 #define __SYCL_TARGET_INTEL_GPU_DG1__ 0
260 #endif
261 #ifndef __SYCL_TARGET_INTEL_GPU_ACM_G10__
262 #define __SYCL_TARGET_INTEL_GPU_ACM_G10__ 0
263 #endif
264 #ifndef __SYCL_TARGET_INTEL_GPU_ACM_G11__
265 #define __SYCL_TARGET_INTEL_GPU_ACM_G11__ 0
266 #endif
267 #ifndef __SYCL_TARGET_INTEL_GPU_ACM_G12__
268 #define __SYCL_TARGET_INTEL_GPU_ACM_G12__ 0
269 #endif
270 #ifndef __SYCL_TARGET_INTEL_GPU_PVC__
271 #define __SYCL_TARGET_INTEL_GPU_PVC__ 0
272 #endif
273 #ifndef __SYCL_TARGET_INTEL_GPU_PVC_VG__
274 #define __SYCL_TARGET_INTEL_GPU_PVC_VG__ 0
275 #endif
276 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM50__
277 #define __SYCL_TARGET_NVIDIA_GPU_SM50__ 0
278 #endif
279 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM52__
280 #define __SYCL_TARGET_NVIDIA_GPU_SM52__ 0
281 #endif
282 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM53__
283 #define __SYCL_TARGET_NVIDIA_GPU_SM53__ 0
284 #endif
285 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM60__
286 #define __SYCL_TARGET_NVIDIA_GPU_SM60__ 0
287 #endif
288 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM61__
289 #define __SYCL_TARGET_NVIDIA_GPU_SM61__ 0
290 #endif
291 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM62__
292 #define __SYCL_TARGET_NVIDIA_GPU_SM62__ 0
293 #endif
294 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM70__
295 #define __SYCL_TARGET_NVIDIA_GPU_SM70__ 0
296 #endif
297 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM72__
298 #define __SYCL_TARGET_NVIDIA_GPU_SM72__ 0
299 #endif
300 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM75__
301 #define __SYCL_TARGET_NVIDIA_GPU_SM75__ 0
302 #endif
303 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM80__
304 #define __SYCL_TARGET_NVIDIA_GPU_SM80__ 0
305 #endif
306 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM86__
307 #define __SYCL_TARGET_NVIDIA_GPU_SM86__ 0
308 #endif
309 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM87__
310 #define __SYCL_TARGET_NVIDIA_GPU_SM87__ 0
311 #endif
312 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM89__
313 #define __SYCL_TARGET_NVIDIA_GPU_SM89__ 0
314 #endif
315 #ifndef __SYCL_TARGET_NVIDIA_GPU_SM90__
316 #define __SYCL_TARGET_NVIDIA_GPU_SM90__ 0
317 #endif
318 #ifndef __SYCL_TARGET_AMD_GPU_GFX700__
319 #define __SYCL_TARGET_AMD_GPU_GFX700__ 0
320 #endif
321 #ifndef __SYCL_TARGET_AMD_GPU_GFX701__
322 #define __SYCL_TARGET_AMD_GPU_GFX701__ 0
323 #endif
324 #ifndef __SYCL_TARGET_AMD_GPU_GFX702__
325 #define __SYCL_TARGET_AMD_GPU_GFX702__ 0
326 #endif
327 #ifndef __SYCL_TARGET_AMD_GPU_GFX801__
328 #define __SYCL_TARGET_AMD_GPU_GFX801__ 0
329 #endif
330 #ifndef __SYCL_TARGET_AMD_GPU_GFX802__
331 #define __SYCL_TARGET_AMD_GPU_GFX802__ 0
332 #endif
333 #ifndef __SYCL_TARGET_AMD_GPU_GFX803__
334 #define __SYCL_TARGET_AMD_GPU_GFX803__ 0
335 #endif
336 #ifndef __SYCL_TARGET_AMD_GPU_GFX805__
337 #define __SYCL_TARGET_AMD_GPU_GFX805__ 0
338 #endif
339 #ifndef __SYCL_TARGET_AMD_GPU_GFX810__
340 #define __SYCL_TARGET_AMD_GPU_GFX810__ 0
341 #endif
342 #ifndef __SYCL_TARGET_AMD_GPU_GFX900__
343 #define __SYCL_TARGET_AMD_GPU_GFX900__ 0
344 #endif
345 #ifndef __SYCL_TARGET_AMD_GPU_GFX902__
346 #define __SYCL_TARGET_AMD_GPU_GFX902__ 0
347 #endif
348 #ifndef __SYCL_TARGET_AMD_GPU_GFX904__
349 #define __SYCL_TARGET_AMD_GPU_GFX904__ 0
350 #endif
351 #ifndef __SYCL_TARGET_AMD_GPU_GFX906__
352 #define __SYCL_TARGET_AMD_GPU_GFX906__ 0
353 #endif
354 #ifndef __SYCL_TARGET_AMD_GPU_GFX908__
355 #define __SYCL_TARGET_AMD_GPU_GFX908__ 0
356 #endif
357 #ifndef __SYCL_TARGET_AMD_GPU_GFX909__
358 #define __SYCL_TARGET_AMD_GPU_GFX909__ 0
359 #endif
360 #ifndef __SYCL_TARGET_AMD_GPU_GFX90A__
361 #define __SYCL_TARGET_AMD_GPU_GFX90A__ 0
362 #endif
363 #ifndef __SYCL_TARGET_AMD_GPU_GFX90C__
364 #define __SYCL_TARGET_AMD_GPU_GFX90C__ 0
365 #endif
366 #ifndef __SYCL_TARGET_AMD_GPU_GFX940__
367 #define __SYCL_TARGET_AMD_GPU_GFX940__ 0
368 #endif
369 #ifndef __SYCL_TARGET_AMD_GPU_GFX941__
370 #define __SYCL_TARGET_AMD_GPU_GFX941__ 0
371 #endif
372 #ifndef __SYCL_TARGET_AMD_GPU_GFX942__
373 #define __SYCL_TARGET_AMD_GPU_GFX942__ 0
374 #endif
375 #ifndef __SYCL_TARGET_AMD_GPU_GFX1010__
376 #define __SYCL_TARGET_AMD_GPU_GFX1010__ 0
377 #endif
378 #ifndef __SYCL_TARGET_AMD_GPU_GFX1011__
379 #define __SYCL_TARGET_AMD_GPU_GFX1011__ 0
380 #endif
381 #ifndef __SYCL_TARGET_AMD_GPU_GFX1012__
382 #define __SYCL_TARGET_AMD_GPU_GFX1012__ 0
383 #endif
384 #ifndef __SYCL_TARGET_AMD_GPU_GFX1013__
385 #define __SYCL_TARGET_AMD_GPU_GFX1013__ 0
386 #endif
387 #ifndef __SYCL_TARGET_AMD_GPU_GFX1030__
388 #define __SYCL_TARGET_AMD_GPU_GFX1030__ 0
389 #endif
390 #ifndef __SYCL_TARGET_AMD_GPU_GFX1031__
391 #define __SYCL_TARGET_AMD_GPU_GFX1031__ 0
392 #endif
393 #ifndef __SYCL_TARGET_AMD_GPU_GFX1032__
394 #define __SYCL_TARGET_AMD_GPU_GFX1032__ 0
395 #endif
396 #ifndef __SYCL_TARGET_AMD_GPU_GFX1033__
397 #define __SYCL_TARGET_AMD_GPU_GFX1033__ 0
398 #endif
399 #ifndef __SYCL_TARGET_AMD_GPU_GFX1034__
400 #define __SYCL_TARGET_AMD_GPU_GFX1034__ 0
401 #endif
402 #ifndef __SYCL_TARGET_AMD_GPU_GFX1035__
403 #define __SYCL_TARGET_AMD_GPU_GFX1035__ 0
404 #endif
405 #ifndef __SYCL_TARGET_AMD_GPU_GFX1036__
406 #define __SYCL_TARGET_AMD_GPU_GFX1036__ 0
407 #endif
408 #ifndef __SYCL_TARGET_AMD_GPU_GFX1100__
409 #define __SYCL_TARGET_AMD_GPU_GFX1100__ 0
410 #endif
411 #ifndef __SYCL_TARGET_AMD_GPU_GFX1101__
412 #define __SYCL_TARGET_AMD_GPU_GFX1101__ 0
413 #endif
414 #ifndef __SYCL_TARGET_AMD_GPU_GFX1102__
415 #define __SYCL_TARGET_AMD_GPU_GFX1102__ 0
416 #endif
417 #ifndef __SYCL_TARGET_AMD_GPU_GFX1103__
418 #define __SYCL_TARGET_AMD_GPU_GFX1103__ 0
419 #endif
420 #ifndef __SYCL_TARGET_AMD_GPU_GFX1150__
421 #define __SYCL_TARGET_AMD_GPU_GFX1150__ 0
422 #endif
423 #ifndef __SYCL_TARGET_AMD_GPU_GFX1151__
424 #define __SYCL_TARGET_AMD_GPU_GFX1151__ 0
425 #endif
426 #ifndef __SYCL_TARGET_AMD_GPU_GFX1200__
427 #define __SYCL_TARGET_AMD_GPU_GFX1200__ 0
428 #endif
429 #ifndef __SYCL_TARGET_AMD_GPU_GFX1201__
430 #define __SYCL_TARGET_AMD_GPU_GFX1201__ 0
431 #endif
432 
433 // This is true when the translation unit is compiled in AOT mode with target
434 // names that supports the "if_architecture_is" features. If an unsupported
435 // target name is specified via "-fsycl-targets", the associated invocation of
436 // the device compiler will set this variable to false, and that will trigger
437 // an error for code that uses "if_architecture_is".
438 static constexpr bool is_allowable_aot_mode =
514 
515 constexpr static std::optional<ext::oneapi::experimental::architecture>
517  // TODO: re-write the logic below when sycl_ext_oneapi_device_architecture
518  // will support targets more than one in -fsycl-targets
519 #if __SYCL_TARGET_INTEL_X86_64__
521 #endif
522 #if __SYCL_TARGET_INTEL_GPU_BDW__
524 #endif
525 #if __SYCL_TARGET_INTEL_GPU_SKL__
527 #endif
528 #if __SYCL_TARGET_INTEL_GPU_KBL__
530 #endif
531 #if __SYCL_TARGET_INTEL_GPU_CFL__
533 #endif
534 #if __SYCL_TARGET_INTEL_GPU_APL__
536 #endif
537 #if __SYCL_TARGET_INTEL_GPU_GLK__
539 #endif
540 #if __SYCL_TARGET_INTEL_GPU_WHL__
542 #endif
543 #if __SYCL_TARGET_INTEL_GPU_AML__
545 #endif
546 #if __SYCL_TARGET_INTEL_GPU_CML__
548 #endif
549 #if __SYCL_TARGET_INTEL_GPU_ICLLP__
551 #endif
552 #if __SYCL_TARGET_INTEL_GPU_EHL__
554 #endif
555 #if __SYCL_TARGET_INTEL_GPU_TGLLP__
557 #endif
558 #if __SYCL_TARGET_INTEL_GPU_RKL__
560 #endif
561 #if __SYCL_TARGET_INTEL_GPU_ADL_S__
563 #endif
564 #if __SYCL_TARGET_INTEL_GPU_ADL_P__
566 #endif
567 #if __SYCL_TARGET_INTEL_GPU_ADL_P__
569 #endif
570 #if __SYCL_TARGET_INTEL_GPU_ADL_N__
572 #endif
573 #if __SYCL_TARGET_INTEL_GPU_DG1__
575 #endif
576 #if __SYCL_TARGET_INTEL_GPU_ACM_G10__
578 #endif
579 #if __SYCL_TARGET_INTEL_GPU_ACM_G11__
581 #endif
582 #if __SYCL_TARGET_INTEL_GPU_ACM_G12__
584 #endif
585 #if __SYCL_TARGET_INTEL_GPU_PVC__
587 #endif
588 #if __SYCL_TARGET_INTEL_GPU_PVC_VG__
590 #endif
591 #if __SYCL_TARGET_NVIDIA_GPU_SM50__
593 #endif
594 #if __SYCL_TARGET_NVIDIA_GPU_SM52__
596 #endif
597 #if __SYCL_TARGET_NVIDIA_GPU_SM53__
599 #endif
600 #if __SYCL_TARGET_NVIDIA_GPU_SM60__
602 #endif
603 #if __SYCL_TARGET_NVIDIA_GPU_SM61__
605 #endif
606 #if __SYCL_TARGET_NVIDIA_GPU_SM62__
608 #endif
609 #if __SYCL_TARGET_NVIDIA_GPU_SM70__
611 #endif
612 #if __SYCL_TARGET_NVIDIA_GPU_SM72__
614 #endif
615 #if __SYCL_TARGET_NVIDIA_GPU_SM75__
617 #endif
618 #if __SYCL_TARGET_NVIDIA_GPU_SM80__
620 #endif
621 #if __SYCL_TARGET_NVIDIA_GPU_SM86__
623 #endif
624 #if __SYCL_TARGET_NVIDIA_GPU_SM87__
626 #endif
627 #if __SYCL_TARGET_NVIDIA_GPU_SM89__
629 #endif
630 #if __SYCL_TARGET_NVIDIA_GPU_SM90__
632 #endif
633 #if __SYCL_TARGET_AMD_GPU_GFX700__
635 #endif
636 #if __SYCL_TARGET_AMD_GPU_GFX701__
638 #endif
639 #if __SYCL_TARGET_AMD_GPU_GFX702__
641 #endif
642 #if __SYCL_TARGET_AMD_GPU_GFX801__
644 #endif
645 #if __SYCL_TARGET_AMD_GPU_GFX802__
647 #endif
648 #if __SYCL_TARGET_AMD_GPU_GFX803__
650 #endif
651 #if __SYCL_TARGET_AMD_GPU_GFX805__
653 #endif
654 #if __SYCL_TARGET_AMD_GPU_GFX810__
656 #endif
657 #if __SYCL_TARGET_AMD_GPU_GFX900__
659 #endif
660 #if __SYCL_TARGET_AMD_GPU_GFX902__
662 #endif
663 #if __SYCL_TARGET_AMD_GPU_GFX904__
665 #endif
666 #if __SYCL_TARGET_AMD_GPU_GFX906__
668 #endif
669 #if __SYCL_TARGET_AMD_GPU_GFX908__
671 #endif
672 #if __SYCL_TARGET_AMD_GPU_GFX909__
674 #endif
675 #if __SYCL_TARGET_AMD_GPU_GFX90a__
677 #endif
678 #if __SYCL_TARGET_AMD_GPU_GFX90c__
680 #endif
681 #if __SYCL_TARGET_AMD_GPU_GFX940__
683 #endif
684 #if __SYCL_TARGET_AMD_GPU_GFX941__
686 #endif
687 #if __SYCL_TARGET_AMD_GPU_GFX942__
689 #endif
690 #if __SYCL_TARGET_AMD_GPU_GFX1010__
692 #endif
693 #if __SYCL_TARGET_AMD_GPU_GFX1011__
695 #endif
696 #if __SYCL_TARGET_AMD_GPU_GFX1012__
698 #endif
699 #if __SYCL_TARGET_AMD_GPU_GFX1030__
701 #endif
702 #if __SYCL_TARGET_AMD_GPU_GFX1031__
704 #endif
705 #if __SYCL_TARGET_AMD_GPU_GFX1032__
707 #endif
708 #if __SYCL_TARGET_AMD_GPU_GFX1033__
710 #endif
711 #if __SYCL_TARGET_AMD_GPU_GFX1034__
713 #endif
714 #if __SYCL_TARGET_AMD_GPU_GFX1035__
716 #endif
717 #if __SYCL_TARGET_AMD_GPU_GFX1036__
719 #endif
720 #if __SYCL_TARGET_AMD_GPU_GFX1100__
722 #endif
723 #if __SYCL_TARGET_AMD_GPU_GFX1101__
725 #endif
726 #if __SYCL_TARGET_AMD_GPU_GFX1102__
728 #endif
729 #if __SYCL_TARGET_AMD_GPU_GFX1103__
731 #endif
732 #if __SYCL_TARGET_AMD_GPU_GFX1150__
734 #endif
735 #if __SYCL_TARGET_AMD_GPU_GFX1151__
737 #endif
738 #if __SYCL_TARGET_AMD_GPU_GFX1200__
740 #endif
741 #if __SYCL_TARGET_AMD_GPU_GFX1201__
743 #endif
744  return std::nullopt;
745 }
746 
747 // Tells if the AOT target matches that architecture.
748 constexpr static bool
750  constexpr std::optional<ext::oneapi::experimental::architecture>
751  current_arch = get_current_architecture_aot();
752  if (current_arch.has_value())
753  return arch == *current_arch;
754  return false;
755 }
756 
757 // Reads the value of "is_allowable_aot_mode" via a template to defer triggering
758 // static_assert() until template instantiation time.
759 template <ext::oneapi::experimental::architecture... Archs>
760 constexpr static bool allowable_aot_mode() {
761  return is_allowable_aot_mode;
762 }
763 
764 // Tells if the current device has one of the architectures in the parameter
765 // pack.
766 template <ext::oneapi::experimental::architecture... Archs>
767 constexpr static bool device_architecture_is() {
768  return (is_aot_for_architecture(Archs) || ...);
769 }
770 
771 static constexpr std::optional<ext::oneapi::experimental::architecture>
778  } else if (Category == ext::oneapi::experimental::arch_category::amd_gpu) {
780  } // add "else if " when adding new category, "else" not needed
781  return std::nullopt;
782 }
783 
784 static constexpr std::optional<ext::oneapi::experimental::architecture>
791  } else if (Category == ext::oneapi::experimental::arch_category::amd_gpu) {
793  } // add "else if " when adding new category, "else" not needed
794  return std::nullopt;
795 }
796 
797 template <ext::oneapi::experimental::arch_category Category>
798 constexpr static bool device_architecture_is_in_category_aot() {
799  constexpr std::optional<ext::oneapi::experimental::architecture>
800  category_min_arch = get_category_min_architecture(Category);
801  constexpr std::optional<ext::oneapi::experimental::architecture>
802  category_max_arch = get_category_max_architecture(Category);
803  constexpr std::optional<ext::oneapi::experimental::architecture>
804  current_arch = get_current_architecture_aot();
805 
806  if (category_min_arch.has_value() && category_max_arch.has_value() &&
807  current_arch.has_value())
808  if ((*category_min_arch <= *current_arch) &&
809  (*current_arch <= *category_max_arch))
810  return true;
811 
812  return false;
813 }
814 
815 template <ext::oneapi::experimental::arch_category... Categories>
816 constexpr static bool device_architecture_is_in_categories() {
817  return (device_architecture_is_in_category_aot<Categories>() || ...);
818 }
819 
820 constexpr static std::optional<ext::oneapi::experimental::arch_category>
822  auto arch_is_in_segment =
825  if ((min <= arch) && (arch <= max))
826  return true;
827  return false;
828  };
829 
830  if (arch_is_in_segment(min_intel_gpu_architecture,
833  if (arch_is_in_segment(min_nvidia_gpu_architecture,
836  if (arch_is_in_segment(min_amd_gpu_architecture, max_amd_gpu_architecture))
838  // add "if " when adding new category
839 
840  return std::nullopt;
841 }
842 
843 template <ext::oneapi::experimental::architecture Arch, typename Compare>
844 constexpr static bool device_architecture_comparison_aot(Compare comp) {
845  constexpr std::optional<ext::oneapi::experimental::arch_category>
846  input_arch_category = get_device_architecture_category(Arch);
847  constexpr std::optional<ext::oneapi::experimental::architecture>
848  current_arch = get_current_architecture_aot();
849 
850  if (input_arch_category.has_value() && current_arch.has_value()) {
851  std::optional<ext::oneapi::experimental::arch_category>
852  current_arch_category = get_device_architecture_category(*current_arch);
853  if (current_arch_category.has_value() &&
854  (*input_arch_category == *current_arch_category))
855  return comp(*current_arch, Arch);
856  }
857  return false;
858 }
859 
862  ext::oneapi::experimental::architecture b) constexpr { return a < b; };
865  ext::oneapi::experimental::architecture b) constexpr { return a <= b; };
868  ext::oneapi::experimental::architecture b) constexpr { return a > b; };
871  ext::oneapi::experimental::architecture b) constexpr { return a >= b; };
872 
873 // Helper object used to implement "else_if_architecture_is",
874 // "else_if_architecture_is_*" and "otherwise". The "MakeCall" template
875 // parameter tells whether a previous clause in the "if-elseif-elseif ..." chain
876 // was true. When "MakeCall" is false, some previous clause was true, so none
877 // of the subsequent "else_if_architecture_is", "else_if_architecture_is_*" or
878 // "otherwise" member functions should call the user's function.
879 template <bool MakeCall> class if_architecture_helper {
880 public:
885  template <ext::oneapi::experimental::architecture... Archs, typename T>
886  constexpr auto else_if_architecture_is(T fn) {
887  if constexpr (MakeCall && device_architecture_is<Archs...>()) {
888  fn();
890  } else {
891  (void)fn;
893  }
894  }
895 
900  template <ext::oneapi::experimental::arch_category... Categories, typename T>
901  constexpr auto else_if_architecture_is(T fn) {
902  if constexpr (MakeCall &&
903  device_architecture_is_in_categories<Categories...>()) {
904  fn();
906  } else {
907  (void)fn;
909  }
910  }
911 
916  template <ext::oneapi::experimental::architecture Arch, typename T>
917  constexpr auto else_if_architecture_is_lt(T fn) {
918  if constexpr (MakeCall &&
919  sycl::detail::device_architecture_comparison_aot<Arch>(
921  fn();
922  return sycl::detail::if_architecture_helper<false>{};
923  } else {
924  (void)fn;
925  return sycl::detail::if_architecture_helper<MakeCall>{};
926  }
927  }
928 
934  template <ext::oneapi::experimental::architecture Arch, typename T>
935  constexpr auto else_if_architecture_is_le(T fn) {
936  if constexpr (MakeCall &&
937  sycl::detail::device_architecture_comparison_aot<Arch>(
939  fn();
940  return sycl::detail::if_architecture_helper<false>{};
941  } else {
942  (void)fn;
943  return sycl::detail::if_architecture_helper<MakeCall>{};
944  }
945  }
946 
951  template <ext::oneapi::experimental::architecture Arch, typename T>
952  constexpr auto else_if_architecture_is_gt(T fn) {
953  if constexpr (MakeCall &&
954  sycl::detail::device_architecture_comparison_aot<Arch>(
956  fn();
957  return sycl::detail::if_architecture_helper<false>{};
958  } else {
959  (void)fn;
960  return sycl::detail::if_architecture_helper<MakeCall>{};
961  }
962  }
963 
969  template <ext::oneapi::experimental::architecture Arch, typename T>
970  constexpr auto else_if_architecture_is_ge(T fn) {
971  if constexpr (MakeCall &&
972  sycl::detail::device_architecture_comparison_aot<Arch>(
974  fn();
975  return sycl::detail::if_architecture_helper<false>{};
976  } else {
977  (void)fn;
978  return sycl::detail::if_architecture_helper<MakeCall>{};
979  }
980  }
981 
988  ext::oneapi::experimental::architecture Arch2, typename T>
989  constexpr auto else_if_architecture_is_between(T fn) {
990  if constexpr (MakeCall &&
991  sycl::detail::device_architecture_comparison_aot<Arch1>(
993  sycl::detail::device_architecture_comparison_aot<Arch2>(
995  fn();
996  return sycl::detail::if_architecture_helper<false>{};
997  } else {
998  (void)fn;
999  return sycl::detail::if_architecture_helper<MakeCall>{};
1000  }
1001  }
1002 
1003  template <typename T> constexpr void otherwise(T fn) {
1004  if constexpr (MakeCall) {
1005  fn();
1006  }
1007  }
1008 };
1009 } // namespace detail
1010 
1011 namespace ext::oneapi::experimental {
1012 
1013 namespace detail {
1014 // Call the callable object "fn" only when this code runs on a device which
1015 // has a certain set of aspects or a particular architecture.
1016 //
1017 // Condition is a parameter pack of int's that define a simple expression
1018 // language which tells the set of aspects or architectures that the device
1019 // must have in order to enable the call. See the "Condition*" values below.
1020 template <typename T, typename... Condition>
1021 #ifdef __SYCL_DEVICE_ONLY__
1022 [[__sycl_detail__::add_ir_attributes_function(
1023  "sycl-call-if-on-device-conditionally", true)]]
1024 #endif
1025 void call_if_on_device_conditionally(T fn, Condition...) {
1026  fn();
1027 }
1028 
1029 // The "Condition" parameter pack above is a sequence of int's that define an
1030 // expression tree. Each node represents a boolean subexpression:
1031 //
1032 // ConditionAspect - Next int is a value from "enum aspect". The
1033 // subexpression is true if the device has this
1034 // aspect.
1035 // ConditionArchitecture - Next int is a value from "enum architecture". The
1036 // subexpression is true if the device has this
1037 // architecture.
1038 // ConditionNot - Next int is the root of another subexpression S1.
1039 // This subexpression is true if S1 is false.
1040 // ConditionAnd - Next int is the root of another subexpression S1.
1041 // The int following that subexpression is the root
1042 // of another subexpression S2. This subexpression
1043 // is true if both S1 and S2 are true.
1044 // ConditionOr - Next int is the root of another subexpression S1.
1045 // The int following that subexpression is the root
1046 // of another subexpression S2. This subexpression
1047 // is true if either S1 or S2 are true.
1048 //
1049 // These values are stored in the application's executable, so they are
1050 // effectively part of the ABI. Therefore, any change to an existing value
1051 // is an ABI break.
1052 //
1053 // There is no programmatic reason for the values to be negative. They are
1054 // negative only by convention to make it easier for humans to distinguish them
1055 // from aspect or architecture values (which are positive).
1056 static constexpr int ConditionAspect = -1;
1057 static constexpr int ConditionArchitecture = -2;
1058 static constexpr int ConditionNot = -3;
1059 static constexpr int ConditionAnd = -4;
1060 static constexpr int ConditionOr = -5;
1061 
1062 // Metaprogramming helper to construct a ConditionOr expression for a sequence
1063 // of architectures. "ConditionAnyArchitectureBuilder<Archs...>::seq" is an
1064 // "std::integer_sequence" representing the expression.
1066 
1067 template <architecture Arch, architecture... Archs>
1068 struct ConditionAnyArchitectureBuilder<Arch, Archs...> {
1069  template <int I1, int I2, int I3, int... Is>
1070  static auto append(std::integer_sequence<int, Is...>) {
1071  return std::integer_sequence<int, I1, I2, I3, Is...>{};
1072  }
1073  using rest = typename ConditionAnyArchitectureBuilder<Archs...>::seq;
1074  static constexpr int arch = static_cast<int>(Arch);
1075  using seq =
1076  decltype(append<ConditionOr, ConditionArchitecture, arch>(rest{}));
1077 };
1078 
1079 template <architecture Arch> struct ConditionAnyArchitectureBuilder<Arch> {
1080  static constexpr int arch = static_cast<int>(Arch);
1081  using seq = std::integer_sequence<int, ConditionArchitecture, arch>;
1082 };
1083 
1084 // Metaprogramming helper to construct a ConditionNot expression.
1085 // ConditionNotBuilder<Exp>::seq" is an "std::integer_sequence" representing
1086 // the expression.
1087 template <typename Exp> struct ConditionNotBuilder {
1088  template <int I, int... Is>
1089  static auto append(std::integer_sequence<int, Is...>) {
1090  return std::integer_sequence<int, I, Is...>{};
1091  }
1092  using rest = typename Exp::seq;
1093  using seq = decltype(append<ConditionNot>(rest{}));
1094 };
1095 
1096 // Metaprogramming helper to construct a ConditionAnd expression.
1097 // "ConditionAndBuilder<Exp1, Exp2>::seq" is an "std::integer_sequence"
1098 // representing the expression.
1099 template <typename Exp1, typename Exp2> struct ConditionAndBuilder {
1100  template <int I, int... I1s, int... I2s>
1101  static auto append(std::integer_sequence<int, I1s...>,
1102  std::integer_sequence<int, I2s...>) {
1103  return std::integer_sequence<int, I, I1s..., I2s...>{};
1104  }
1105  using rest1 = typename Exp1::seq;
1106  using rest2 = typename Exp2::seq;
1107  using seq = decltype(append<ConditionAnd>(rest1{}, rest2{}));
1108 };
1109 
1110 // Metaprogramming helper to construct a ConditionOr expression.
1111 // "ConditionOrBuilder<Exp1, Exp2>::seq" is an "std::integer_sequence"
1112 // representing the expression.
1113 template <typename Exp1, typename Exp2> struct ConditionOrBuilder {
1114  template <int I, int... I1s, int... I2s>
1115  static auto append(std::integer_sequence<int, I1s...>,
1116  std::integer_sequence<int, I2s...>) {
1117  return std::integer_sequence<int, I, I1s..., I2s...>{};
1118  }
1119  using rest1 = typename Exp1::seq;
1120  using rest2 = typename Exp2::seq;
1121  using seq = decltype(append<ConditionOr>(rest1{}, rest2{}));
1122 };
1123 
1124 // Helper function to call call_if_on_device_conditionally() while converting
1125 // the "std::integer_sequence" for a condition expression into individual
1126 // arguments of type int.
1127 template <typename T, int... Is>
1129  std::integer_sequence<int, Is...>) {
1131 }
1132 
1133 // Same sort of helper object for "else_if_architecture_is".
1134 template <typename MakeCallIf> class if_architecture_is_helper {
1135 public:
1136  template <architecture... Archs, typename T,
1137  typename = std::enable_if<std::is_invocable_v<T>>>
1139  using make_call_if =
1140  ConditionAndBuilder<MakeCallIf,
1142  using make_else_call_if = ConditionAndBuilder<
1143  MakeCallIf,
1145 
1146  using cond = typename make_call_if::seq;
1149  }
1150 
1151  template <typename T> void otherwise(T fn) {
1152  using cond = typename MakeCallIf::seq;
1154  }
1155 };
1156 
1157 } // namespace detail
1158 
1159 #ifdef SYCL_EXT_ONEAPI_DEVICE_ARCHITECTURE_NEW_DESIGN_IMPL
1160 template <architecture... Archs, typename T>
1161 static auto if_architecture_is(T fn) {
1162  using make_call_if = detail::ConditionAnyArchitectureBuilder<Archs...>;
1163  using make_else_call_if = detail::ConditionNotBuilder<make_call_if>;
1164 
1165  using cond = typename make_call_if::seq;
1167  return detail::if_architecture_is_helper<make_else_call_if>{};
1168 }
1169 #else
1173 template <architecture... Archs, typename T>
1174 constexpr static auto if_architecture_is(T fn) {
1175  static_assert(sycl::detail::allowable_aot_mode<Archs...>(),
1176  "The if_architecture_is function may only be used when AOT "
1177  "compiling with '-fsycl-targets=spir64_x86_64' or "
1178  "'-fsycl-targets=*_gpu_*'");
1179  if constexpr (sycl::detail::device_architecture_is<Archs...>()) {
1180  fn();
1181  return sycl::detail::if_architecture_helper<false>{};
1182  } else {
1183  (void)fn;
1184  return sycl::detail::if_architecture_helper<true>{};
1185  }
1186 }
1187 #endif // SYCL_EXT_ONEAPI_DEVICE_ARCHITECTURE_NEW_DESIGN_IMPL
1188 
1192 template <arch_category... Categories, typename T>
1193 constexpr static auto if_architecture_is(T fn) {
1195  Categories...>()) {
1196  fn();
1197  return sycl::detail::if_architecture_helper<false>{};
1198  } else {
1199  (void)fn;
1200  return sycl::detail::if_architecture_helper<true>{};
1201  }
1202 }
1203 
1207 template <architecture Arch, typename T>
1208 constexpr static auto if_architecture_is_lt(T fn) {
1209  if constexpr (sycl::detail::device_architecture_comparison_aot<Arch>(
1211  fn();
1212  return sycl::detail::if_architecture_helper<false>{};
1213  } else {
1214  (void)fn;
1215  return sycl::detail::if_architecture_helper<true>{};
1216  }
1217 }
1218 
1222 template <architecture Arch, typename T>
1223 constexpr static auto if_architecture_is_le(T fn) {
1224  if constexpr (sycl::detail::device_architecture_comparison_aot<Arch>(
1226  fn();
1227  return sycl::detail::if_architecture_helper<false>{};
1228  } else {
1229  (void)fn;
1230  return sycl::detail::if_architecture_helper<true>{};
1231  }
1232 }
1233 
1237 template <architecture Arch, typename T>
1238 constexpr static auto if_architecture_is_gt(T fn) {
1239  if constexpr (sycl::detail::device_architecture_comparison_aot<Arch>(
1241  fn();
1242  return sycl::detail::if_architecture_helper<false>{};
1243  } else {
1244  (void)fn;
1245  return sycl::detail::if_architecture_helper<true>{};
1246  }
1247 }
1248 
1252 template <architecture Arch, typename T>
1253 constexpr static auto if_architecture_is_ge(T fn) {
1254  if constexpr (sycl::detail::device_architecture_comparison_aot<Arch>(
1256  fn();
1257  return sycl::detail::if_architecture_helper<false>{};
1258  } else {
1259  (void)fn;
1260  return sycl::detail::if_architecture_helper<true>{};
1261  }
1262 }
1263 
1268 template <architecture Arch1, architecture Arch2, typename T>
1269 constexpr static auto if_architecture_is_between(T fn) {
1270  if constexpr (sycl::detail::device_architecture_comparison_aot<Arch1>(
1272  sycl::detail::device_architecture_comparison_aot<Arch2>(
1274  fn();
1275  return sycl::detail::if_architecture_helper<false>{};
1276  } else {
1277  (void)fn;
1278  return sycl::detail::if_architecture_helper<true>{};
1279  }
1280 }
1281 
1282 } // namespace ext::oneapi::experimental
1283 } // namespace _V1
1284 } // namespace sycl
constexpr auto else_if_architecture_is_lt(T fn)
The condition is true only if the object F comes from a previous call whose associated condition is f...
constexpr auto else_if_architecture_is_gt(T fn)
The condition is true only if the object F comes from a previous call whose associated condition is f...
constexpr auto else_if_architecture_is_le(T fn)
The condition is true only if the object F comes from a previous call whose associated condition is f...
constexpr auto else_if_architecture_is(T fn)
The condition is true only if the object F comes from a previous call whose associated condition is f...
constexpr auto else_if_architecture_is_between(T fn)
The condition is true only if the object F comes from a previous call whose associated condition is f...
constexpr auto else_if_architecture_is_ge(T fn)
The condition is true only if the object F comes from a previous call whose associated condition is f...
#define __SYCL_TARGET_INTEL_X86_64__
#define __SYCL_TARGET_INTEL_GPU_PVC_VG__
#define __SYCL_TARGET_AMD_GPU_GFX1102__
#define __SYCL_TARGET_AMD_GPU_GFX803__
#define __SYCL_TARGET_INTEL_GPU_GLK__
#define __SYCL_TARGET_AMD_GPU_GFX810__
#define __SYCL_TARGET_NVIDIA_GPU_SM61__
#define __SYCL_TARGET_INTEL_GPU_WHL__
#define __SYCL_TARGET_AMD_GPU_GFX802__
#define __SYCL_TARGET_AMD_GPU_GFX1100__
#define __SYCL_TARGET_NVIDIA_GPU_SM53__
#define __SYCL_TARGET_AMD_GPU_GFX90C__
#define __SYCL_TARGET_INTEL_GPU_CFL__
#define __SYCL_TARGET_AMD_GPU_GFX908__
#define __SYCL_TARGET_AMD_GPU_GFX90A__
#define __SYCL_TARGET_AMD_GPU_GFX1010__
#define __SYCL_TARGET_INTEL_GPU_DG1__
#define __SYCL_TARGET_AMD_GPU_GFX1031__
#define __SYCL_TARGET_AMD_GPU_GFX902__
#define __SYCL_TARGET_AMD_GPU_GFX1103__
#define __SYCL_TARGET_NVIDIA_GPU_SM89__
#define __SYCL_TARGET_INTEL_GPU_ACM_G11__
#define __SYCL_TARGET_INTEL_GPU_ACM_G10__
#define __SYCL_TARGET_INTEL_GPU_PVC__
#define __SYCL_TARGET_AMD_GPU_GFX1033__
#define __SYCL_TARGET_AMD_GPU_GFX805__
#define __SYCL_TARGET_AMD_GPU_GFX1201__
#define __SYCL_TARGET_AMD_GPU_GFX1035__
#define __SYCL_TARGET_AMD_GPU_GFX942__
#define __SYCL_TARGET_AMD_GPU_GFX1200__
#define __SYCL_TARGET_AMD_GPU_GFX1012__
#define __SYCL_TARGET_INTEL_GPU_KBL__
#define __SYCL_TARGET_AMD_GPU_GFX1151__
#define __SYCL_TARGET_AMD_GPU_GFX1101__
#define __SYCL_TARGET_INTEL_GPU_SKL__
#define __SYCL_TARGET_NVIDIA_GPU_SM50__
#define __SYCL_TARGET_AMD_GPU_GFX1011__
#define __SYCL_TARGET_AMD_GPU_GFX1030__
#define __SYCL_TARGET_AMD_GPU_GFX900__
#define __SYCL_TARGET_INTEL_GPU_ADL_S__
#define __SYCL_TARGET_INTEL_GPU_ADL_N__
#define __SYCL_TARGET_INTEL_GPU_EHL__
#define __SYCL_TARGET_AMD_GPU_GFX904__
#define __SYCL_TARGET_NVIDIA_GPU_SM52__
#define __SYCL_TARGET_AMD_GPU_GFX941__
#define __SYCL_TARGET_AMD_GPU_GFX1036__
#define __SYCL_TARGET_INTEL_GPU_ADL_P__
#define __SYCL_TARGET_AMD_GPU_GFX801__
#define __SYCL_TARGET_NVIDIA_GPU_SM80__
#define __SYCL_TARGET_INTEL_GPU_TGLLP__
#define __SYCL_TARGET_INTEL_GPU_RKL__
#define __SYCL_TARGET_NVIDIA_GPU_SM90__
#define __SYCL_TARGET_INTEL_GPU_AML__
#define __SYCL_TARGET_INTEL_GPU_ICLLP__
#define __SYCL_TARGET_NVIDIA_GPU_SM72__
#define __SYCL_TARGET_AMD_GPU_GFX906__
#define __SYCL_TARGET_INTEL_GPU_BDW__
#define __SYCL_TARGET_NVIDIA_GPU_SM86__
#define __SYCL_TARGET_AMD_GPU_GFX702__
#define __SYCL_TARGET_NVIDIA_GPU_SM60__
#define __SYCL_TARGET_INTEL_GPU_ACM_G12__
#define __SYCL_TARGET_AMD_GPU_GFX1013__
#define __SYCL_TARGET_AMD_GPU_GFX940__
#define __SYCL_TARGET_AMD_GPU_GFX1150__
#define __SYCL_TARGET_NVIDIA_GPU_SM62__
#define __SYCL_TARGET_INTEL_GPU_APL__
#define __SYCL_TARGET_AMD_GPU_GFX701__
#define __SYCL_TARGET_AMD_GPU_GFX1034__
#define __SYCL_TARGET_INTEL_GPU_CML__
#define __SYCL_TARGET_NVIDIA_GPU_SM70__
#define __SYCL_TARGET_AMD_GPU_GFX700__
#define __SYCL_TARGET_AMD_GPU_GFX1032__
#define __SYCL_TARGET_AMD_GPU_GFX909__
#define __SYCL_TARGET_NVIDIA_GPU_SM87__
#define __SYCL_TARGET_NVIDIA_GPU_SM75__
constexpr static bool allowable_aot_mode()
constexpr auto device_arch_compare_op_lt
static constexpr ext::oneapi::experimental::architecture min_amd_gpu_architecture
static constexpr std::optional< ext::oneapi::experimental::architecture > get_category_min_architecture(ext::oneapi::experimental::arch_category Category)
constexpr static bool device_architecture_comparison_aot(Compare comp)
constexpr static bool device_architecture_is_in_category_aot()
static constexpr ext::oneapi::experimental::architecture max_amd_gpu_architecture
static constexpr ext::oneapi::experimental::architecture min_intel_gpu_architecture
constexpr static bool device_architecture_is_in_categories()
static constexpr ext::oneapi::experimental::architecture min_nvidia_gpu_architecture
constexpr auto device_arch_compare_op_gt
constexpr static std::optional< ext::oneapi::experimental::arch_category > get_device_architecture_category(ext::oneapi::experimental::architecture arch)
constexpr static bool device_architecture_is()
constexpr static bool is_aot_for_architecture(ext::oneapi::experimental::architecture arch)
constexpr static std::optional< ext::oneapi::experimental::architecture > get_current_architecture_aot()
static constexpr std::optional< ext::oneapi::experimental::architecture > get_category_max_architecture(ext::oneapi::experimental::arch_category Category)
static constexpr ext::oneapi::experimental::architecture max_nvidia_gpu_architecture
constexpr auto device_arch_compare_op_ge
constexpr auto device_arch_compare_op_le
static constexpr bool is_allowable_aot_mode
static constexpr ext::oneapi::experimental::architecture max_intel_gpu_architecture
void call_if_on_device_conditionally_helper(T fn, std::integer_sequence< int, Is... >)
constexpr static auto if_architecture_is_lt(T fn)
The condition is true only if the device which executes the if_architecture_is_lt function has an arc...
constexpr static auto if_architecture_is(T fn)
The condition is true only if the device which executes the if_architecture_is function has any one o...
constexpr static auto if_architecture_is_between(T fn)
The condition is true only if the device which executes the if_architecture_is_between function has a...
constexpr static auto if_architecture_is_le(T fn)
The condition is true only if the device which executes the if_architecture_is_le function has an arc...
constexpr static auto if_architecture_is_ge(T fn)
The condition is true only if the device which executes the if_architecture_is_ge function has an arc...
constexpr static auto if_architecture_is_gt(T fn)
The condition is true only if the device which executes the if_architecture_is_gt function has an arc...
auto autodecltype(a) b
Definition: access.hpp:18
decltype(append< ConditionAnd >(rest1{}, rest2{})) seq
static auto append(std::integer_sequence< int, I1s... >, std::integer_sequence< int, I2s... >)
decltype(append< ConditionOr >(rest1{}, rest2{})) seq
static auto append(std::integer_sequence< int, I1s... >, std::integer_sequence< int, I2s... >)