Skip to content

Auto folding for Reshape Op possibly broken #164

@fpjentzsch

Description

@fpjentzsch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions