Skip to content
Commit 72878c5b authored by Rickard Bolin's avatar Rickard Bolin
Browse files

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's avatarRickard Bolin <rickard.bolin@arm.com>
Change-Id: Icf18f0bad27a1220073574ffa2626f8838b4df69
parent 14d6e95d
Loading
Loading
Loading
Pipeline #26024 passed with stages
in 14 minutes and 42 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment