Visible to Intel only — GUID: yvr1517935101689
Ixiasoft
Visible to Intel only — GUID: yvr1517935101689
Ixiasoft
3. OpenCL Kernel Design Best Practices
In general, you should optimize a kernel that targets a single compute unit first. After you optimize this compute unit, increase the performance by scaling the hardware to fill the remainder of the FPGA. The hardware footprint of the kernel correlates with the time it takes for hardware compilation. Therefore, the more optimizations you can perform with a smaller footprint (that is, a single compute unit), the more hardware compilations you can perform in a given amount of time.
In addition to data processing and memory access optimizations, consider implementing the following design practices, if applicable, when you create your kernels.
- Transferring Data Via Channels or OpenCL Pipes
Unrolling Loops
Optimizing Floating-Point Operations
Allocating Aligned Memory
Aligning a Struct with or without Padding
Maintaining Similar Structures for Vector Type Elements
Avoiding Pointer Aliasing
Avoid Expensive Functions
Avoiding Work-Item ID-Dependent Backward Branching