|
| 1 | += sycl_ext_oneapi_device_is_integrated_gpu |
| 2 | + |
| 3 | +:source-highlighter: coderay |
| 4 | +:coderay-linenums-mode: table |
| 5 | + |
| 6 | +// This section needs to be after the document title. |
| 7 | +:doctype: book |
| 8 | +:toc2: |
| 9 | +:toc: left |
| 10 | +:encoding: utf-8 |
| 11 | +:lang: en |
| 12 | +:dpcpp: pass:[DPC++] |
| 13 | +:endnote: —{nbsp}end{nbsp}note |
| 14 | + |
| 15 | +// Set the default source code type in this document to C++, |
| 16 | +// for syntax highlighting purposes. This is needed because |
| 17 | +// docbook uses c++ and html5 uses cpp. |
| 18 | +:language: {basebackend@docbook:c++:cpp} |
| 19 | + |
| 20 | + |
| 21 | +== Notice |
| 22 | + |
| 23 | +[%hardbreaks] |
| 24 | +Copyright (C) 2025 Intel Corporation. All rights reserved. |
| 25 | + |
| 26 | +Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks |
| 27 | +of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by |
| 28 | +permission by Khronos. |
| 29 | + |
| 30 | + |
| 31 | +== Contact |
| 32 | + |
| 33 | +To report problems with this extension, please open a new issue at: |
| 34 | + |
| 35 | +https://github.com/intel/llvm/issues |
| 36 | + |
| 37 | + |
| 38 | +== Dependencies |
| 39 | + |
| 40 | +This extension is written against the SYCL 2020 revision 10 specification. |
| 41 | +All references below to the "core SYCL specification" or to section numbers in |
| 42 | +the SYCL specification refer to that revision. |
| 43 | + |
| 44 | + |
| 45 | +== Status |
| 46 | + |
| 47 | +This is a proposed extension specification, intended to gather community |
| 48 | +feedback. Interfaces defined in this specification may not be implemented yet |
| 49 | +or may be in a preliminary state. The specification itself may also change in |
| 50 | +incompatible ways before it is finalized. *Shipping software products should |
| 51 | +not rely on APIs defined in this specification.* |
| 52 | + |
| 53 | + |
| 54 | +== Overview |
| 55 | + |
| 56 | +This extension allows host code to check whether a SYCL GPU device is "integrated" |
| 57 | +or "discrete". An integrated GPU device often shares memory with the host CPU, |
| 58 | +while a discrete GPU is often a separate card with its own memory. However, some |
| 59 | +GPU devices may not fit neatly into either category, so implementors may provide |
| 60 | +their own judgement when categorizing a GPU device as "integrated" vs. "discrete". |
| 61 | + |
| 62 | + |
| 63 | +== Specification |
| 64 | + |
| 65 | +=== Feature test macro |
| 66 | + |
| 67 | +This extension provides a feature-test macro as described in the core SYCL |
| 68 | +specification. An implementation supporting this extension must predefine the |
| 69 | +macro `SYCL_EXT_ONEAPI_DEVICE_IS_INTEGRATED_GPU` to one of the values defined |
| 70 | +in the implementation supports this feature, or applications can test the |
| 71 | +macro's value to determine which of the extension's features the implementation |
| 72 | +supports. |
| 73 | + |
| 74 | +[%header,cols="1,5"] |
| 75 | +|=== |
| 76 | +|Value |
| 77 | +|Description |
| 78 | + |
| 79 | +|1 |
| 80 | +|The APIs of this experimental extension are not versioned, so the feature-test |
| 81 | + macro always has this value. |
| 82 | +|=== |
| 83 | + |
| 84 | +=== New device aspect |
| 85 | + |
| 86 | +This extension adds new device aspect: |
| 87 | + |
| 88 | +```c++ |
| 89 | +namespace sycl { |
| 90 | + |
| 91 | +enum class aspect : /*unspecified*/ { |
| 92 | + ext_oneapi_is_integrated_gpu |
| 93 | +}; |
| 94 | + |
| 95 | +} // namespace sycl |
| 96 | +``` |
| 97 | + |
| 98 | +[width="100%",%header,cols="50%,50%"] |
| 99 | +|=== |
| 100 | +|Aspect |
| 101 | +|Description |
| 102 | + |
| 103 | +|`ext_oneapi_is_integrated_gpu` |
| 104 | +|Indicates that the implementation identifies this device as integrated GPU. All devices |
| 105 | +that have this aspect also have `aspect::gpu`. |
| 106 | +|=== |
| 107 | + |
| 108 | +== Issues |
| 109 | + |
| 110 | +None. |
0 commit comments