Hi Sami, thanks for your reply. Yeah we think the fastest way is to use numpy to implement our custom adder/multiplier. Your code snippet is very helpful. We can use the use the matrix multiplication to do what we want now. But that’s not enough, because we want to build our own adder/multiplier, cannot use their existing matmul method directly.
Then we try to use the add and mul from the numpy to implement our custom adder/multiplier. By doing this, we found that we need to use at least one loop as the data in one col/row need to be copied and used in many multiplications. Using the loop makes it slow again. Do you have any insight about this?
Thanks again!