From 079bf2b09226fd3354e5777eb0c473b9bb79d3d1 Mon Sep 17 00:00:00 2001 From: Eugene Smirnov Date: Tue, 22 Sep 2020 13:21:06 +0300 Subject: [PATCH] support for conversion between fp32 and fp16 types for ngraph_helpers (#2357) --- inference-engine/tests/ngraph_functions/src/utils/ngraph_helpers.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inference-engine/tests/ngraph_functions/src/utils/ngraph_helpers.cpp b/inference-engine/tests/ngraph_functions/src/utils/ngraph_helpers.cpp index ac00d88..dd0c9e3 100644 --- a/inference-engine/tests/ngraph_functions/src/utils/ngraph_helpers.cpp +++ b/inference-engine/tests/ngraph_functions/src/utils/ngraph_helpers.cpp @@ -491,6 +491,10 @@ std::vector convertOutputPrecision(std::vector &outp case element::Type_t::f32: { return convertPrecision(output, elementsCount, element::Type(toPrecision).size()); } + case element::Type_t::f16: { + // ngraph float16 has single ctor from float + return convertPrecision(output, elementsCount, element::Type(toPrecision).size()); + } case element::Type_t::u64: { return convertPrecision(output, elementsCount, element::Type(toPrecision).size()); } -- 2.7.4