Developer Guide


Ignoring Dependencies Between Accessor Arguments

To direct the
Intel® oneAPI
to ignore dependencies between accessor arguments in a DPC++ kernel, add the
attribute to your kernel. The
attribute allows the compiler to analyze dependencies between kernel memory operations more accurately, which can result in higher performance. This attribute functions like the
flag, which is no longer supported. However, you can apply the
attribute at a more fine-grained level to individual kernels in the source code.
#include <CL/sycl/INTEL/fpga_extensions.hpp> ... event event_restrict = device_queue.submit([&](handler& cgh) { // create accessors from global memory auto in_accessor = in_buf.template get_access<sycl_read>(cgh); auto out_accessor = restrict_out_buf.template get_access<sycl_write>(cgh); // run the task (note the use of the attribute here) cgh.single_task<KernelArgsRestrict>([=]() [[intel::kernel_args_restrict]] { for (unsigned i = 0; i < size; i++) { out_accessor[i] = in_accessor[i]; } }); }); ...
This attribute is an assurance to the compiler that accessors in the kernel arguments (and accessors derived from them) never point to the same memory location as any other accessor. It is up to you to ensure that this property is true.
For additional information, refer to the FPGA tutorial sample "Kernel Args Restrict" listed in the Intel® oneAPI Samples Browser on Linux* or Intel® oneAPI Samples Browser on Windows*.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at