Skip to content

Commit 93eb9ff

Browse files
authored
[SYCL][CUDA] Add missing device scope to atomic fence (#9824)
This patch maps `Device` scope fence to the right NVVM built-in. It would previously incorrectly use the CTA (threadblock) variant.
1 parent 56e05af commit 93eb9ff

File tree

1 file changed

+2
-0
lines changed
  • libclc/ptx-nvidiacl/libspirv/synchronization

1 file changed

+2
-0
lines changed

libclc/ptx-nvidiacl/libspirv/synchronization/barrier.cl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ _CLC_OVERLOAD _CLC_DEF void __spirv_MemoryBarrier(unsigned int memory,
1313
unsigned int semantics) {
1414
if (memory == CrossDevice) {
1515
__nvvm_membar_sys();
16+
} else if (memory == Device) {
17+
__nvvm_membar_gl();
1618
} else {
1719
__nvvm_membar_cta();
1820
}

0 commit comments

Comments
 (0)