Developer Guide and Reference

  • 2021.4
  • 09/27/2021
  • Public Content

DPCT1065

Message

Consider replacing
sycl::nd_item::barrier()
with
sycl::nd_item::barrier(sycl::access::fence_space::local_space)
for better performance if there is no access to global memory.

Detailed Help

The function
sycl::nd_item::barrier()
ensures correct memory access ordering in the global and local address space. If the kernel function has no memory accesses in the global memory, it is safe to replace
sycl::nd_item::barrier()
with
sycl::nd_item::barrier(sycl::access::fence_space::local_space)
for better performance.

Suggestions to Fix

Replace
sycl::nd_item::barrier()
with
sycl::nd_item::barrier(sycl::access::fence_space::local_space)
.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.