Matrix–Vector Operation
CIM_MVM
| 31-26 | 25-21 | 20-16 | 15-11 | 10-6 | 5-0 | |
|---|---|---|---|---|---|---|
| CIM_MVM | 000000 | rs | rt | re | rf | flags |
CIM_MVM rs,rt,re,rf,[flags]Performs the multiplication operation between the input feature vector and the weight matrix
- The address of the input vector in the local memory is
GRF[rs], with a length ofGRF[rt]; - The address of the weight matrix in the computing-in-memory array is
GRF[re]; - The batch operation count is
GRF[rf]. When this value is greater than1, this instruction executes batch multiplication operations; flagsrepresents the flag bits, includingSP_V,SP_B, etc., used to support the structured pruning algorithm and bit-level sparsity algorithm respectively. This field can be extended to support new operations and custom functions.
Example:
CIM_MVM $1,$2,$3,$4,SP_V,SP_B