-
Notifications
You must be signed in to change notification settings - Fork 791
[SYCL][DOC] Add new extension sycl_ext_oneapi_clock #19842
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
Changes from 1 commit
a5f0e9d
571c693
eeb908b
0843199
42ab657
4fd1334
a01aeb3
d1f70e7
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 |
---|---|---|
|
@@ -61,8 +61,8 @@ when the kernel is submitted to the queue. | |
== Overview | ||
|
||
This extension introduces a new free function `clock(scope)`. This function | ||
allows the user to sample the value from one of three clocks provided by compute | ||
units, depending on the value of the scope argument. `scope` is an | ||
allows the user to sample the value from one of three clocks provided by the | ||
compute units, depending on the value of the scope argument. `scope` is an | ||
enumeration constant of the new `clock_scope` enum. It should be passed to the | ||
function to define the clock source; e.g., `clock(clock_scope::sub_group)` | ||
samples the value from a clock shared by all work-items executing in the same | ||
|
@@ -89,7 +89,8 @@ supports. | |
|Description | ||
|
||
|1 | ||
|Initial version of this extension. | ||
|The APIs of this experimental extension are not versioned, so the feature-test | ||
macro always has this value. | ||
|=== | ||
|
||
=== New device aspect | ||
|
@@ -126,7 +127,16 @@ enum class clock_scope : /* unspecified */ { | |
work_group, | ||
device | ||
}; | ||
``` | ||
|
||
KornevNikita marked this conversation as resolved.
Show resolved
Hide resolved
|
||
An enumerator from `clock_scope` should be passed to the `clock()` function to | ||
define the clock source. There are 3 clock sources: `sub_group`, `work_group` | ||
and `device`. Values from the first one (`sub_group`) are shared by all | ||
work-items executing in the same sub-group. Values from the second one | ||
(`work_group`) are are shared by all work-items executing in the same work-group | ||
etc. | ||
steffenlarsen marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
```c++ | ||
uint64_t clock(clock_scope scope = clock_scope::sub_group); | ||
|
||
|
||
} // namespace sycl::ext::oneapi::experimental | ||
|
Uh oh!
There was an error while loading. Please reload this page.