From 73fceedf1d4dc3325d01f5bdeb78ee2444d6537a Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Fri, 16 Oct 2020 10:14:22 +0300 Subject: [PATCH] [IE CLDNN] Add FP16 axes precision to Interpolate-4 (#2681) JIRA: 40805 --- inference-engine/src/cldnn_engine/cldnn_program.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inference-engine/src/cldnn_engine/cldnn_program.cpp b/inference-engine/src/cldnn_engine/cldnn_program.cpp index b78288b..cda4ab7 100644 --- a/inference-engine/src/cldnn_engine/cldnn_program.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_program.cpp @@ -3487,6 +3487,10 @@ void Program::CreateInterpolatePrimitive(cldnn::topology& topology, InferenceEng auto data = constantBlob->buffer().as(); for (size_t i = 0; i < constantBlob->size(); ++i) scales.push_back(data[i]); + } else if (axesPrecision == InferenceEngine::Precision::FP16) { + auto data = static_cast(constantBlob->buffer()); + for (size_t i = 0; i < constantBlob->size(); ++i) + scales.push_back(cldnn::half_to_float(data[i])); } else { THROW_IE_EXCEPTION << layer->name << " Incorrect scales input precision"; } -- 2.7.4