Creating Multiple Compute Units - 2022.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2022-12-07
Version
2022.2 English

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.

Tip: If you create a single kernel object for multiple CUs without matching connectivity, then XRT assigns one or more CUs with matching connectivity to the kernel object, and ignores the other CUs in the hardware when executing the kernel.