Skip to content

Commit 8e8f6ad

Browse files
authored
[SYCL][Doc] Clarify work_group_scratch_memory errs (#20651)
Clarify the error conditions when launching a kernel that uses the sycl_ext_oneapi_work_group_scratch_memory extension.
1 parent 2c3e9b1 commit 8e8f6ad

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_work_group_scratch_memory.asciidoc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,20 @@ device local memory required by the kernel in bytes.
140140

141141
|===
142142

143-
=== Total allocation check
143+
=== Error conditions
144+
145+
If a kernel's static call tree contains a call to
146+
`get_work_group_scratch_memory`, then the `work_group_scratch_size` property
147+
must be specified on every launch of the kernel.
148+
Implementations are encouraged to throw a synchronous `exception` with the
149+
`errc::memory_allocation` error code when this property is missing from the
150+
kernel launch.
144151

145152
If the total amount of device local memory requested exceeds a device's
146153
local memory capacity as reported by `info::device::local_mem_size`
147-
then the implementation must throw a synchronous exception with the
154+
then the implementation must throw a synchronous `exception` with the
148155
`errc::memory_allocation` error code from the kernel invocation command
149-
(e.g. `parallel_for`). This check must take all APIs that allocation device
156+
(e.g. `parallel_for`). This check must take all APIs that allocate device
150157
local memory into account, whether via the `work_group_scratch_size` property
151158
or other APIs such as `local_accessor`.
152159

0 commit comments

Comments
 (0)