Moves 512B matrices stored in L1 Buffer to L0B Buffer. It supports 2D format movement and 3D format movement.
High-dimensional tiling movement 2D format
[object Object]Synchronous high-dimensional tiling movement 2D format
[object Object]High-dimensional tiling movement 3D format
[object Object]Synchronous high-dimensional tiling movement 3D format
[object Object]
Table 1 2D format parameter description
Table 2 3D format parameter description
None
PIPE_MTE1
- The start address of dst must be 512-byte aligned, and the start address of src must be 32-byte aligned.
- This interface does not support the transpose scenario for 2D format movement. To implement transpose, refer to .
The input feature map and filter must be in NC1HWC0 format, where C0 is the lowest dimension and C0 is fixed to 16 (32 for u8/s8 types), and C1=C/C0.
To simplify the scenario, the following scenario assumes that the channel of the input feature map is 4, that is, Ci=4. The shape of the input feature maps in A1 is (Hi,Wi,Ci), and after being processed by load3dv1, the data shape in A2 is (WoHo, HkWk*Ci). Where Wo and Ho are the output shape after convolution, and Hk and Wk are the filter shape.
Intuitively, the img2col process is that the filter slides over the feature map, and the corresponding feature map data is expanded into each row of the output data. The filter first slides Wo steps in the W direction, then takes one step in the H direction and repeats the above process, ultimately outputting Wo * Ho rows of data. In the following figure, the red and yellow data represent the first row and the second row, respectively. The numbers indicate the relationship among the original input data, filter, and output data. It can be seen that load3dv1 first moves the 4 numbers corresponding to 00 in the Ci dimension of the input data, and then moves the 4 numbers corresponding to 01. The final size of this row is HkWkCi, that is, 334=36 numbers.
- The corresponding feature map format is shown in the following figure:
- The corresponding filter format is shown in the following figure:
Where n is the number of filters. The dimension arrangement is (Hk,Wk,Ci,n), but note that the format in the following figure also needs to be converted according to the B matrix format in Mmad.
In actual operations, due to storage space or computing capacity limitations, the entire convolution computation is usually divided into blocks, and only a small block of data is moved and computed at a time.
For the feature map in A2, there are two schemes: horizontal blocking and vertical blocking, corresponding to repeatMode 0 and 1 in the parameters, respectively.
Note: The fractal matrix size in the following figures is 4x4, but the actual size should be 16x16 (16x32 for u8/s8 types).
When repeatMode = 0, each repeat changes the position of reading data points in the filter window, and then jumps to the next C0 position.
When repeatMode = 1, the position of reading data in the filter window remains unchanged, and each repeat advances C0 elements in the feature map.