OpenCL Attributes - 2021.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2022-03-29
Version
2021.2 English

This section describes OpenCL™ attributes that can be added to source code to assist system optimization by the Vitis core development kit, and Vitis HLS tool synthesis.

The Vitis core development kit 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 usage and DDR bandwidth usage. 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, and so on.

The following table includes the OpenCL attributes are specified by type.

Table 1. OpenCL Attributes by Type
Type Attributes
Kernel Optimization
Function Inlining
Task-level Pipeline
Pipeline
Loop Optimization
Array Optimization
Note: Array variables only accept a single array optimization attribute.
Tip: The Vitis compiler also supports many of the standard attributes supported by gcc, such as:
  • ALWAYS_INLINE
  • NOINLINE
  • UNROLL
  • NOUNROLL