Skip to content

Fix issues with forwardDims()

Olivier BICHLER requested to merge forwarddims into dev

To be merged after !90 (merged).

Fixes two issues with forwardDims():

  • The previous iterative algorithm may be stuck in specific cases (see example below);
  • It should always recompute all nodes output dims, because the graph may have changed.

Example of stuck case:

  1. Initial graph is output dims forwarded;
  2. Scaling operators are inserted before some Conv;
  3. The graph is output dims re-forwarded. Here is what might happen:
    • Start the forward dims list with Producers;
    • Move to next child nodes: the Conv;
    • Conv cannot be forward dim because their new input, a Scaling node, is not forward dim;
    • Check if Conv childs are forward dim: if they are not directly the new Scaling node, they are!
    • We get stuck in a state where listNodes == nextList, although all nodes output dim are computable!
Edited by Olivier BICHLER

Merge request reports