Gentle bump. It would be really useful to understand this decision because it complicates interacting with 3rd party libraries. For example, ACL expects convolution weights in the format OHWI, and depthwise weights in the format HWI, with the depth multiplier value being passed separately.
Now in ACL’s case we currently use the convert layout pass to convert the weights to the expected format. We can specify our desired layout {'nn.conv2d':['NHWC', 'OHWI']}
, although this inconsistency means that the format we actually get converting a depthwise convolution is IHWM rather than the expected MHWI. In order to get this to work correctly I would need to specify: {'nn.conv2d':['NHWC', 'IHWO']}
, but this would then cause issues for a normal convolution. Currently the convert layout pass has no logic to distinguish between a ‘normal’ convolution or a depthwise one.
I’m trying to understand whether improvements need to be made to the convert layout pass - to distinguish between these types. Or alternatively, I couldn’t see any reason in the code that ties us to using the OIHW format other than preference and ease of checking for a depthwise convolution later on. Maybe I’m really incorrect about this though.
Thanks, any pointers would be a great help