Skip to content

Commit 2a571a8

Browse files
committed
All backends are synchronizing
1 parent a62099b commit 2a571a8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/intrinsics.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,20 @@ localmemory(::Type{T}, dims) where {T} = localmemory(T, Val(dims))
193193
194194
Read `val` from a lane with higher id given by `offset`.
195195
196+
!!! note
197+
`shfl_down` must be encountered by all workitems of a sub-group executing the kernel or by none at all.
198+
196199
!!! note
197200
Backend implementations **must** implement:
198201
```
199202
@device_override shfl_down(val::T, offset::Integer) where T
200203
```
201204
As well as the on-device functionality.
205+
206+
This implementation **must** be synchronizing.
207+
That is, kernels using this function can safely assume that
208+
they do **not** need a `sub_group_barrier` before calling
209+
this function.
202210
"""
203211
function shfl_down end
204212

0 commit comments

Comments
 (0)