-
Notifications
You must be signed in to change notification settings - Fork 806
[SYCL][Doc] Add sycl_ext_oneapi_device_is_integrated
spec extension
#20085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: sycl
Are you sure you want to change the base?
Changes from all commits
ad95ba1
71791cb
c767268
3e0d37e
b5f7d52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,121 @@ | ||||||
= sycl_ext_oneapi_device_is_integrated | ||||||
|
||||||
:source-highlighter: coderay | ||||||
:coderay-linenums-mode: table | ||||||
|
||||||
// This section needs to be after the document title. | ||||||
:doctype: book | ||||||
:toc2: | ||||||
:toc: left | ||||||
:encoding: utf-8 | ||||||
:lang: en | ||||||
:dpcpp: pass:[DPC++] | ||||||
:endnote: —{nbsp}end{nbsp}note | ||||||
|
||||||
// Set the default source code type in this document to C++, | ||||||
// for syntax highlighting purposes. This is needed because | ||||||
// docbook uses c++ and html5 uses cpp. | ||||||
:language: {basebackend@docbook:c++:cpp} | ||||||
|
||||||
|
||||||
== Notice | ||||||
|
||||||
[%hardbreaks] | ||||||
Copyright (C) 2025 Intel Corporation. All rights reserved. | ||||||
|
||||||
Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks | ||||||
of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by | ||||||
permission by Khronos. | ||||||
|
||||||
|
||||||
== Contact | ||||||
|
||||||
To report problems with this extension, please open a new issue at: | ||||||
|
||||||
https://github.com/intel/llvm/issues | ||||||
|
||||||
|
||||||
== Dependencies | ||||||
|
||||||
This extension is written against the SYCL 2020 revision 10 specification. | ||||||
All references below to the "core SYCL specification" or to section numbers in | ||||||
the SYCL specification refer to that revision. | ||||||
|
||||||
|
||||||
== Status | ||||||
|
||||||
This is a proposed extension specification, intended to gather community | ||||||
feedback. Interfaces defined in this specification may not be implemented yet | ||||||
or may be in a preliminary state. The specification itself may also change in | ||||||
incompatible ways before it is finalized. *Shipping software products should | ||||||
not rely on APIs defined in this specification.* | ||||||
|
||||||
|
||||||
== Overview | ||||||
|
||||||
This extension allows host code to check whether a physical device, represented | ||||||
by a SYCL device, is integrated with the host. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd suggest a slight rewording here because the difference between "integrated" and "discrete" isn't always clear cut:
@bashbaug does this seem like a reasonable description? Any suggestions? |
||||||
|
||||||
|
||||||
== Specification | ||||||
|
||||||
=== Feature test macro | ||||||
|
||||||
This extension provides a feature-test macro as described in the core SYCL | ||||||
specification. An implementation supporting this extension must predefine the | ||||||
macro `SYCL_EXT_ONEAPI_DEVICE_IS_INTEGRATED` to one of the values defined in the | ||||||
implementation supports this feature, or applications can test the macro's | ||||||
value to determine which of the extension's features the implementation | ||||||
supports. | ||||||
|
||||||
[%header,cols="1,5"] | ||||||
|=== | ||||||
|Value | ||||||
|Description | ||||||
|
||||||
|1 | ||||||
|The APIs of this experimental extension are not versioned, so the feature-test | ||||||
macro always has this value. | ||||||
|=== | ||||||
|
||||||
=== New device aspects | ||||||
|
||||||
This extension adds new device aspect: | ||||||
|
||||||
```c++ | ||||||
namespace sycl { | ||||||
|
||||||
enum class aspect : /*unspecified*/ { | ||||||
ext_oneapi_device_is_integrated | ||||||
}; | ||||||
|
||||||
} // namespace sycl | ||||||
``` | ||||||
|
||||||
[width="100%",%header,cols="50%,50%"] | ||||||
|=== | ||||||
|Aspect | ||||||
|Description | ||||||
|
||||||
|`ext_oneapi_device_is_integrated` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|Indicates that the device supports the | ||||||
`sycl::device::get_info<sycl::ext::oneapi::info::device::device_is_integrated>()` | ||||||
call. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious, why can't we support this call for all devices? Do we need special support in the backend driver? If we could support the query for all devices, then we would just need an aspect, rather than having both the info descriptor and an aspect (which tells whether the info descriptor is supported). |
||||||
|=== | ||||||
|
||||||
=== New device descriptor | ||||||
|
||||||
[width="100%",%header,cols="50%,50%,50%"] | ||||||
|=== | ||||||
|Device descriptor | ||||||
|Return type | ||||||
|Description | ||||||
|
||||||
|`sycl::ext::oneapi::info::device::device_is_integrated` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The word "device" seems redundant because this is a device query. |
||||||
|bool | ||||||
|Returns `true` if device is integrated, otherwise returns `false`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|=== | ||||||
|
||||||
== Issues | ||||||
|
||||||
None. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well rename this too to match the query name.