When building large graphs with multiple subgraphs, it is sometimes useful to control the exact mapping of kernels to AI Engines, either relative to other kernels or in an absolute sense. Specifying location constraints provides a powerful mechanism to create a robust, scalable, and predictable mapping of your graph onto the AI Engine array. It also reduces the choices for the mapper to try, which can considerably speed up the mapper.
- By default, location constraint specification is turned off. This is controlled by the Specify Kernel Location checkbox.
- To specify kernel location constraint, select the Specify Kernel
Location checkbox. This enables the
editbox Location [column row], which
allows you to enter kernel location in terms of column and row.
- Location can be specified in terms of a
[column row]
vector. - The default value for location is
[0 0]
. - You may also enter pre-defined variables to specify column-row specification.
- Location can be specified in terms of a
- If the location constraint is specified, then in the generated dataflowgraph,
the corresponding kernel will have the following snippet added to specify the
location
constraint.
adf::location<adf::kernel>(kernelInst) = adf::tile(col, row);
Where:
-
kernelInst
is the name of the kernel instance object created. -
col
is the column value, as entered in the Location field. -
row
is the row value, as entered in Location field.
-
Important:
MATLAB variables can be used to specify the
kernel locations.