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

ID 683846
Date 6/21/2022

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

Document Table of Contents

11.4. Kernel Replication Using the num_compute_units(X,Y,Z) Attribute

You can replicate your single work-item OpenCL kernel by including the num_compute_units(X,Y,Z) kernel attribute.

As mentioned in Specifying Number of Compute Units, including the num_compute_units(N) kernel attribute in your kernel instructs the Intel® FPGA SDK for OpenCL™ Offline Compiler to generate multiple compute units to process data. The num_compute_unit(N) attribute instructs the offline compiler to generate N identical copies of the kernel in hardware.

Remember: To identify the specific compute unit controlling the data-dependent kernel processing, call the get_compute_id() intrinsic function.