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

ID 683846
Date 12/19/2022
Public
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.