Case 2: Conditional Array of Sub-Graphs - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
XD100
Release Date
2024-03-05
Version
2023.2 English

In this example, an array of different kernel type and different size are created depending on a parameter value:

    typename std::conditional<ID==1,
                              std::array<Sub0<1>, 2>,
                              std::array<Sub0<2>, 3>>::type _subs;

If ID parameter is equal to 1, an array of two kernels parametrized with value 1 is generated. If ID is not equal to 1, the array length is 3 and the kernel is parametrized with 2.

Type make CASE=2 aie aieviz to visualize the resulting graph of this testcase.