Skip to content
Snippets Groups Projects

Reshape forward dims

Merged Cyril Moineau requested to merge ReshapeForwardDims into dev

The goal of this MR is to be able to forwardDims this graph by constant folding it considering Shape as constant:

Drawing_2025-01-08_09.20.26.excalidraw

Here is a small animation of the simplification processus

ForwardDimsShapeFold

Major modification

  • Constant folding return a bool if it changed the graph
  • Add more verbosity for debug mode with constantFolding and forwardDims methods
  • ConstantFolding now has an arg constantShape to consider Shape As constant producer during folding process.
  • forwardDims possess an arg shapeAsConstant to constantFold shape during dims propagation. (Allow to forwardDims for Reshape as we add a constant for the shape input)

TODO

  • Update constant folding
  • Add a recipe constant_shape_folding to fold shape
  • Add a unit test
Edited by Cyril Moineau

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading