gemmini icon indicating copy to clipboard operation
gemmini copied to clipboard

gemmini_loop_conv_ws

Open minmin20028 opened this issue 3 years ago • 2 comments

Hi. I wonder what the gemmini_loop_conv_ws ISA`s role is.

In sp_tiled_conv function, There is only gemmini_loop_conv_ws ISA. And below that, the whole processes of mvin, compute, and mvout etc are commented out.

Do gemmini_loop_conv_ws and the whloe process do the same thing? Or does using just one gemmini_loop_conv_ws makes whole process more efficient or fast?

Since there is no such instruction like gemmini_loop_conv_ws for depthwise convolution, I`m wondering if making such instruction for DW conv would make it work more efficiently.

Always thanks for your work. Best, Mingeon.

minmin20028 avatar Sep 16 '22 10:09 minmin20028

The commented-out code does the exact same thing as gemmini_loop_conv_ws. We just keep the commented-out code to help with debugging and as a form of documentation.

The gemmini_loop_conv_ws instruction dynamically schedules the mvin, mvout, and compute instructions to maximize the overlap of matmul and data-movement operations. The instruction also performs double-buffering, and some other optimizations to improve performance above what the commented-out code can achieve (even though both of them functionally do the same thing).

You can look in LoopConv.scala or LoopMatmul.scala to learn more about how these "loop-unroller" instructions are implemented.

hngenc avatar Sep 19 '22 01:09 hngenc

I`ll check what you mentioned. Thanks for your reply.

minmin20028 avatar Sep 23 '22 02:09 minmin20028