Altera has just released their optimisation guide for OpenCL-on-FPGAs. It does not go into the howto’s of OpenCL, but assumes you have knowledge of the technology. Niether does it provide any information on the basics of Altera’s Stratix V or other FPGA.
It is the first public optimisation document, so it is appreciated to send feedback directly. Not aware what OpenCL can do on an FPGA? Watch the below video.
https://www.youtube.com/watch?v=p25CVFMc-dk
Subjects
The following subjects and optimisation tricks are discussed:
- FPGA Overview
- Pipelines
- Good Design Practices
- Avoid Pointer Aliasing
- Avoid Expensive Functions
- Avoid Work-Item ID-Dependent Backward Branching
- Aligned Memory Allocation
- Ensure 4-Byte Alignment for All Data Structures
- Maintain Similar Structures for Vector Type Elements
- Optimization of Data Processing Efficiency
- Specify a Maximum Work-Group Size or a Required Work-Group Size
- Loop Unrolling
- Resource Sharing
- Kernel Vectorization
- Multiple Compute Units
- Combination of Compute Unit Replication and Kernel SIMD Vectorization
- Resource-Driven Optimization
- Floating-Point Operations
- Optimization of Memory Access Efficiency
- General Guidelines on Optimizing Memory Accesses
- Optimize Global Memory Accesses
- Perform Kernel Computations Using Constant, Local or Private Memory
- Single Work-Item Execution
Carefully compare these with CPU and GPU optimisation guides to be able to write more generic OpenCL code.
Download
You can download the document here.
If you have any question on OpenCL-on-FPGAs, OpenCL, generic optimisations or Altera FPGAs, feel welcomed to contact us.
Related Posts
IWOCL 2017 – all the talks
... the PDF. Heterogeneous Computing Using Modern C++ with OpenCL Devices - Rod Burns and Ruyman Reyes (Codeplay) This hands-on ...
Install (Intel) Altera Quartus 16.0.2 OpenCL on Ubuntu 14.04 Linux
... risk. Have your board maker follow this tutorial to test their libraries on Ubuntu. Note 2: we tested on Ubuntu 14.04. No ...
How to install OpenCL on Windows
... your Windows machine ready for OpenCL is rather straightforward. In short, you only need the latest drivers for your OpenCL device(s) ...
Starting with Altera OpenCL-on-FPGAs
Altera has been very busy adding resources and has kicked off the beginning of June with opening up their OpenCL-program for the general ...