diff options
author | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2019-11-13 15:16:28 +0000 |
---|---|---|
committer | Áron Virginás-Tar <aron.virginas-tar@arm.com> | 2019-11-15 16:54:47 +0000 |
commit | 87972be8d838f6fde6f6e98dd81c422e85457a5e (patch) | |
tree | 78e8a9abfefc6db67f9a71f6c1fddb0444daac5f /src/armnn/NetworkUtils.hpp | |
parent | 5716de25c6981d004e32b81dc65b4869eda25f7c (diff) | |
download | armnn-87972be8d838f6fde6f6e98dd81c422e85457a5e.tar.gz |
IVGCVSW-4119 Fix FP16 to FP32 fallback mechanism in optimizer to work with Dequantize
* Check for output data type as well as input data type when determining
whether we should attempt to fall back to FP32 if FP16 is not supported
* Override output type for Dequantize in IsLayerSupported() instead of
input type
* Updated original input type from FP16 to FP32 in InsertConvertFp32ToFp16LayersAfter()
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Change-Id: Ic6477fd17cea5a91bd8bf9ae0cf836520897d5b7
Diffstat (limited to 'src/armnn/NetworkUtils.hpp')
-rw-r--r-- | src/armnn/NetworkUtils.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/armnn/NetworkUtils.hpp b/src/armnn/NetworkUtils.hpp index 421c52a6a7..38fb22350d 100644 --- a/src/armnn/NetworkUtils.hpp +++ b/src/armnn/NetworkUtils.hpp @@ -11,7 +11,9 @@ namespace armnn { -std::vector<ConvertFp16ToFp32Layer*> InsertConvertFp16ToFp32LayersBefore(Graph& graph, Layer& layer); +std::vector<ConvertFp16ToFp32Layer*> InsertConvertFp16ToFp32LayersBefore(Graph& graph, + Layer& layer, + bool expectCorrectInputType = true); std::vector<ConvertFp32ToFp16Layer*> InsertConvertFp32ToFp16LayersAfter(Graph& graph, Layer& layer); |