Skip to content

Commit

Permalink
Add a missing memory fence to a SIMD test. (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt authored Sep 26, 2024
1 parent 5628d43 commit 5b983a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/device/intrinsics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,13 @@ end

tg_a = MtlThreadGroupArray(T, (8, 8))
tg_a[pos.x, pos.y] = a[pos.x, pos.y]
sg_a = simdgroup_load(tg_a)
threadgroup_barrier(Metal.MemoryFlagThreadGroup)

sg_a = simdgroup_load(tg_a)
tg_b = MtlThreadGroupArray(T, (8, 8))
simdgroup_store(sg_a, tg_b)

threadgroup_barrier(Metal.MemoryFlagThreadGroup)
b[pos.x, pos.y] = tg_b[pos.x, pos.y]

return
Expand Down

0 comments on commit 5b983a5

Please sign in to comment.