Skip to content

Ambiguity in Expressing Dynamic Shape for Reshape in Circle IR #15834

@dayo09

Description

@dayo09

There is ambiguity regarding how to correctly express dynamic shapes with the Reshape operation in Circle IR, especially when shape and shapeSignature attributes are involved.

Background

  • In Circle Tensors, dynamic dimensions are typically indicated by setting the value in shape to 1 and in shapeSignature to -1.
  • This allows dynamic shape representation at the model level for tensor definitions.

Question
When using the Reshape operation, is there a proper way to express a dynamic output shape?

  • The newShape parameter of Reshape only accepts List[int].
  • It is unclear how to propagate dynamic shape (e.g., a symbolic or runtime-dependent dimension) through Reshape, if List[int] does not support non-integer (e.g., symbolic) entries.
  • Does this imply that dynamic output shapes are not supported for Reshape, or is there a recommended workaround for encoding dynamic dimensions in newShape?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions