Intel® FPGA SDK for OpenCL™ Pro Edition: Programming Guide

ID 683846
Date 6/21/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

7.23. Compiling Your Kernel Incrementally (-incremental)

To compile the modifications you make to your OpenCL design incrementally, include the -incremental Intel® FPGA SDK for OpenCL™ Offline Compiler command option in your aoc command.

If you have a large, mutli-kernel system and you only want to modify a single kernel, the Intel® FPGA SDK for OpenCL™ Offline Compiler can reuse the results from a previous compilation, and only synthesize, place, and route the kernel(s) that you have modified. Leveraging this incremental compilation feature allows you to dramatically reduce compilation time.

Attention: Enable the incremental compilation feature for internal development of your OpenCL design only. For best circuit performance on your final design, run a full compilation.

Example incremental compilation flow:

aoc -incremental <your_kernel_filename>.cl

/*****Update kernels in your OpenCL design*****/

aoc -incremental -fast-compile <your_kernel_filename>.cl
  1. Perform an initial setup compilation in a clean directory, with the incremental mode enabled, by invoking the aoc -incremental <your_kernel_filename>.cl command.
    Note: You must enable the -incremental flag when performing the setup compilation.

    This setup compilation does not reuse any result from a previous compilation. When performing a setup compilation, do not include the -fast-compile offline compiler command option in the aoc command because it increases the probability of encountering errors in future incremental compilations.

    Tip: Intel® recommends that you perform a fresh setup compilation whenever compilation time is not a concern because it reduces the probability of compilation failures in future incremental compilations. Performing many consecutive incremental compilations increases the probability of compilation failures. It also decreases the hardware performance and efficiency of the generated .aocx file.
  2. Modify the kernels in your OpenCL design.
    Your design may contain multiple .cl files.
  3. Perform an incremental compilation on your design. For optimal compilation speed, also include the -fast-compile flag in your aoc command:
    aoc -incremental -fast-compile <your_kernel_filename>.cl
  4. Review the Incremental compile section of the report.html file to verify the changes that the offline compiler has detected.
    The report.html file is in the <your_kernel_filename>/reports directory.