Skip to content

Commit 5b983a5

Browse files
authored
Add a missing memory fence to a SIMD test. (#432)
1 parent 5628d43 commit 5b983a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/device/intrinsics.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,13 @@ end
373373

374374
tg_a = MtlThreadGroupArray(T, (8, 8))
375375
tg_a[pos.x, pos.y] = a[pos.x, pos.y]
376-
sg_a = simdgroup_load(tg_a)
376+
threadgroup_barrier(Metal.MemoryFlagThreadGroup)
377377

378+
sg_a = simdgroup_load(tg_a)
378379
tg_b = MtlThreadGroupArray(T, (8, 8))
379380
simdgroup_store(sg_a, tg_b)
381+
382+
threadgroup_barrier(Metal.MemoryFlagThreadGroup)
380383
b[pos.x, pos.y] = tg_b[pos.x, pos.y]
381384

382385
return

0 commit comments

Comments
 (0)