MLBEDSW-10631: Rewrite CONST op
TOSA CONST operators does not have any input tensors, only an attribute
containing a constant tensor and an output tensor. Until now, we've
simply ignored the CONST operators in the TOSA reader since we're only
interested in the constant output tensor. This causes issues in the case
of a single CONST operator network, where ignoring CONST results in an
optimized network without any operators, which our raw mode writer can
not handle.
This patch replaces CONST operators with IDENTITY operators which gets
cleaned up during RemoveReshape to either be removed completely or get
converted to a memory copy when it is the last operator remaining in the
network.
Signed-off-by:
Rickard Bolin <rickard.bolin@arm.com>
Change-Id: Icf18f0bad27a1220073574ffa2626f8838b4df69