When building the .xclbin file you can
specify the number of kernel instances, or compute units (CU) to implement into the
hardware by using the --connectivity.nk option as
described in Creating Multiple Instances of a Kernel. After the .xclbin has been built, you can access the CUs from the
software application.
A single kernel object (xrt::kernel) can be used
to execute multiple CUs as long as the CUs have identical interface connectivity,
meaning the CUs have the same memory connections (krnl.group_id). If all CUs do not have the same kernel connectivity, then
you can create a separate kernel object for each unique configuration of the kernel, as
shown in the example below.
krnl1 = xrt::kernel(device, xclbin_uuid, "vadd:{vadd_1,vadd_2}");
krnl2 = xrt::kernel(device, xclbin_uuid, "vadd:{vadd_3}");
In the example above, krnl1 can be used to launch the CUs
vadd_1 and vadd_2 which have matching
connectivity, and krnl2 can be used to launch vadd_3,
which has different connectivity.