OpenCL Attributes
Optimizations in OpenCL
This section describes OpenCL attributes that can be added to source code to assist system
optimization by the SDAccel compiler, xocc
, the SDSoC system compilers,
sdscc
and sds++
, and Vivado HLS synthesis.
SDx provides OpenCL attributes to optimize your code for data movement and kernel performance. The goal of data movement optimization is to maximize the system level data throughput by maximizing interface bandwidth utilization and DDR bandwidth utilization. The goal of kernel computation optimization is to create processing logic that can consume all the data as soon as they arrive at kernel interfaces. This is generally achieved by expanding the processing code to match the data path with techniques such as function inlining and pipelining, loop unrolling, array partitioning, dataflowing, etc.
Type | Attributes |
---|---|
Kernel Size | |
Function Inlining | |
Task-level Pipeline | |
Pipeline | |
Loop Unrolling | |
Array Optimization |
Note: Array variables only accept a single array optimization attribute.
|
gcc
, such as always_inline
,
noinline
, unroll
, and nounroll
.