MLBEDSW-11246: Add support for TOSA COND_IF/WHILE_LOOP
Basic structure:
- Schedule each subgraph separately. If a subgraph is called multiple times, duplicate it.
- Attach a carve-out tensor to the parent subgraph that acts as a sub-scratch tensor.
- Inline each subgraph into one big HLC stream in HLC generator. At the same time, offset the addresses so they point to the carve-out tensor.
- Two-pass RCS gen to be able to support forward jumps.
Limitations:
- Only TOSA COND_IF and WHILE_LOOP implemented. Not any of the TFLite equivalents.
- TFLite networks with IF/WHILE/CALL ops are probably broken by this patch since we are no longer compiling every subgraph, but instead traversing the call tree.
Signed-off-by: Johan Gunnarsson johan.gunnarsson@arm.com Change-Id: If1c9c374b9a8daca30d9ddf38301cbe0ffbbf657