MLBEDSW-10899: Handle RESCALE with output unsigned properly
Networks with a RESCALE that writes to graph output and has output_unsigend set lost the unsignedness of the output tensor when the ReinterpretCast op was handled. This caused wrong OFM clipping and zero point.
This patch changes the following:
- Don't add REINTERPRETCAST before/after RESCALE. Instead, keep the RESCALE and its attributes and deal with the unsigned input/output when lowering SchedIR to HLC.
- Reset all buffers when cloning IFM. This is important when cloning IFM with the purpose of creating a new intermediate tensor. If the IFM is constant, the cloned tensor will inherit the contant data as well, which is not desired in most cases.
Signed-off-by: Johan Gunnarsson johan.gunnarsson@arm.com Change-Id: Ie0adbdfbee18e92568acb1d1f44637fbdd309e8d