aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/RefLayerSupport.cpp
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2020-03-16 16:36:10 +0000
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2020-03-19 15:41:12 +0000
commitea54a01f6bd30f013cbe88ae1751985bc86b6af5 (patch)
tree7edb7d659ea4210c1256beb5edf57601b317c82d /src/backends/reference/RefLayerSupport.cpp
parent25334cf3d53fe7fff98776b44a199ca341f62f1a (diff)
downloadarmnn-ea54a01f6bd30f013cbe88ae1751985bc86b6af5.tar.gz
IVGCVSW-4516 Add ConvertFp32ToBf16Layer and Ref workload support
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I9099a4f840fb747336f77d20a0868b64e801a310
Diffstat (limited to 'src/backends/reference/RefLayerSupport.cpp')
-rw-r--r--src/backends/reference/RefLayerSupport.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp
index a4f4efd92a..9f22b9ef0e 100644
--- a/src/backends/reference/RefLayerSupport.cpp
+++ b/src/backends/reference/RefLayerSupport.cpp
@@ -411,6 +411,21 @@ bool RefLayerSupport::IsConvertFp16ToFp32Supported(const TensorInfo& input,
&FalseFuncU8<>));
}
+bool RefLayerSupport::IsConvertFp32ToBf16Supported(const TensorInfo& input,
+ const TensorInfo& output,
+ Optional<std::string&> reasonIfUnsupported) const
+{
+ bool supported = true;
+
+ supported &= CheckSupportRule(TypeIs(input, DataType::Float32), reasonIfUnsupported,
+ "Reference for ConvertFp32ToBf16 layer: input type not supported");
+
+ supported &= CheckSupportRule(TypeIs(output, DataType::BFloat16), reasonIfUnsupported,
+ "Reference for ConvertFp32ToBf16 layer: output type not supported");
+
+ return supported;
+}
+
bool RefLayerSupport::IsConvertFp32ToFp16Supported(const TensorInfo& input,
const TensorInfo& output,
Optional<std::string&> reasonIfUnsupported) const