From c001e54403c3ead20f6fc4cf96b290af00895002 Mon Sep 17 00:00:00 2001 From: Vladimir Paramuzov Date: Thu, 18 Feb 2021 14:24:00 +0300 Subject: [PATCH] [IE CLDNN] Added WA for interpolate mode (#4382) --- inference-engine/src/cldnn_engine/ops/interpolate.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inference-engine/src/cldnn_engine/ops/interpolate.cpp b/inference-engine/src/cldnn_engine/ops/interpolate.cpp index d0c401669d39ad..b785886edf3fda 100644 --- a/inference-engine/src/cldnn_engine/ops/interpolate.cpp +++ b/inference-engine/src/cldnn_engine/ops/interpolate.cpp @@ -124,7 +124,15 @@ void CreateInterpolateOp(Program& p, const std::shared_ptrv4 Interpolate converison + // This WA must be removed as soon as optimized kernel supports linear mode + auto input_shape_rank = op->get_input_shape(0).size(); + auto mode = attrs.mode; + if (mode == ngraph::op::v4::Interpolate::InterpolateMode::linear && input_shape_rank < 5) { + mode = ngraph::op::v4::Interpolate::InterpolateMode::linear_onnx; + } + + auto cldnnSampleType = GetResampleType(mode); auto shapeCalcMode = GetShapeCalculationMode(attrs.shape_calculation_mode); auto coordTransMode = GetCoordinateTransformationMode(attrs.coordinate_transformation_mode); auto nearestMode = GetNearestMode(attrs.nearest_mode);