Creating Multiple Compute Units - 2024.2 English - UG1700

Data Center Acceleration Using Vitis User Guide (UG1700)

Document ID
UG1700
Release Date
2025-01-15
Version
2024.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 specific 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.

Important: 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.