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

ID 683846
Date 10/04/2021
Public

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

Document Table of Contents

11.3.1. Hardware for Kernel Interface

The Intel® FPGA SDK for OpenCL™ Offline Compiler generates hardware around the kernel pipeline. For some OpenCL™ applications, these interface hardware components are not necessary.

Hardware around the kernel pipeline is necessary for functions such as the following:

  • Dispatching IDs for work-items and work-groups
  • Communicating with the host regarding kernel arguments and work-group sizes

Figure 34 illustrates the hardware that the offline compiler generates when it compiles the following kernel:

__kernel void my_kernel(global int* arg)
{
    …
    int sum = 0;
    for(unsigned i = 0; i < n; i++)
    {
        if(sum < m) sum += val;
    }
    *arg = sum;
    …
}
Figure 34.  Intel® FPGA SDK for OpenCL™ Offline Compiler-Generated Interface Hardware around a Kernel Pipeline