Xilinx/finn

Expand support for grouped convolutions

nickfraser opened this issue · 0 comments

Details

As discussed in #883, grouped convolutions (i.e., groups>1) are only supported when in_channels == out_channels == groups. LowerConvsToMatMul fails with a reshape error.

New behavior

Ideally, it would be great to expand support for arbitrary grouped convolutions. In particular, it could be low hanging fruit to expand current support to allow in_channels == groups and out_channels = n*groups (where n is an integer >1) as this would simply result in individual input channels being broadcasted to multiple output channels.

Motivation

Current support handles the common case of standard depthwise-separable convolutions well, but grouped convolutions are becoming more popular as a general optimization strategy to reduce the amount of weights / ops in a given layer.

Parts of FINN affected

Certainly the LowerConvsToMatMul transform in the FINN compiler is affected. It's likely that some changed would need to be made to FINN-HLSLIB as well.