Reshape is a "pe_op" and doesn't have a "NumChannels" attribute. This means that during auto folding in SetFolding() its maximum PE will be determined by the last dimension of its normal output shape.
However, a valid folding requires PE to divide the last axis of both, the input and output shape.
Example (kws model) where I would expect this to fail:
[Layer with PE=1] -> 1x10x49x1 -> Reshape -> 1x490 -> DWC -> [Layer with SIMD=10]
Auto folding could set PE of Reshape > 1, which would be illegal.
Such a simple (no-op) operator as Reshape should probably always infer its stream width (PE) from the surrounding nodes, but it is unclear how this mechanism is best implemented.
Reshape is a "pe_op" and doesn't have a "NumChannels" attribute. This means that during auto folding in SetFolding() its maximum PE will be determined by the last dimension of its normal output shape.
However, a valid folding requires PE to divide the last axis of both, the input and output shape.
Example (kws model) where I would expect this to fail:
[Layer with PE=1] -> 1x10x49x1 -> Reshape -> 1x490 -> DWC -> [Layer with SIMD=10]
Auto folding could set PE of Reshape > 1, which would be illegal.
Such a simple (no-op) operator as Reshape should probably always infer its stream width (PE) from the surrounding nodes, but it is unclear how this mechanism is best implemented.