[IE][VPU]: Enable DTS for some eltwise operations (#2242)
authorAndrew Bakalin <andrew.bakalin@intel.com>
Thu, 17 Sep 2020 12:28:33 +0000 (15:28 +0300)
committerGitHub <noreply@github.com>
Thu, 17 Sep 2020 12:28:33 +0000 (15:28 +0300)
* Enable DTS for Maximum, Minimum, Less, LogicalNot

inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp
inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_binary_elementwise.cpp
inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_unary_elementwise.cpp

index a2a3c1a..d909876 100644 (file)
@@ -63,6 +63,9 @@ const Transformations& getDefaultTransformations() {
         {ngraph::opset3::Equal::type_info,                     dynamicToStaticShapeBinaryEltwise},
         {ngraph::opset3::Greater::type_info,                   dynamicToStaticShapeBinaryEltwise},
         {ngraph::opset3::Power::type_info,                     dynamicToStaticShapeBinaryEltwise},
+        {ngraph::opset3::Maximum::type_info,                   dynamicToStaticShapeBinaryEltwise},
+        {ngraph::opset3::Minimum::type_info,                   dynamicToStaticShapeBinaryEltwise},
+        {ngraph::opset3::Less::type_info,                      dynamicToStaticShapeBinaryEltwise},
         {ngraph::vpu::op::DynamicNonMaxSuppression::type_info, dynamicToStaticNonMaxSuppression},
         {ngraph::opset3::NonZero::type_info,                   dynamicToStaticShapeNonZero},
         {ngraph::opset3::TopK::type_info,                      dynamicToStaticShapeTopK},
@@ -78,6 +81,7 @@ const Transformations& getDefaultTransformations() {
         {ngraph::opset3::Softmax::type_info,                   dynamicToStaticUnaryElementwise},
         {ngraph::opset3::Exp::type_info,                       dynamicToStaticUnaryElementwise},
         {ngraph::opset3::Sqrt::type_info,                      dynamicToStaticUnaryElementwise},
+        {ngraph::opset3::LogicalNot::type_info,                dynamicToStaticUnaryElementwise},
         {ngraph::opset3::StridedSlice::type_info,              dynamicToStaticShapeStridedSlice},
         {ngraph::opset3::Squeeze::type_info,                   dynamicToStaticShapeSqueeze},
         {ngraph::opset3::Gather::type_info,                    dynamicToStaticShapeGather},
index e2bdb39..2c5cd3c 100644 (file)
@@ -314,7 +314,10 @@ INSTANTIATE_TEST_CASE_P(EltwiseBroadcast, DynamicToStaticShapeEltwise, testing::
         ngraph::opset3::Greater::type_info,
         ngraph::opset3::Power::type_info,
         ngraph::opset3::Multiply::type_info,
-        ngraph::opset3::Subtract::type_info),
+        ngraph::opset3::Subtract::type_info,
+        ngraph::opset3::Maximum::type_info,
+        ngraph::opset3::Minimum::type_info,
+        ngraph::opset3::Less::type_info),
     testing::Values(
         EltwiseParams{DataDims{1000}, DataDims{1}, DynamicToStaticShapeEltwise::reference_simple},
         EltwiseParams{DataDims{1000, 1, 1}, DataDims{1000, 1, 1}, DynamicToStaticShapeEltwise::reference_simple},
@@ -338,7 +341,10 @@ INSTANTIATE_TEST_CASE_P(EltwiseBroadcastSingleDSR, DynamicToStaticShapeEltwiseSi
         ngraph::opset3::Greater::type_info,
         ngraph::opset3::Power::type_info,
         ngraph::opset3::Multiply::type_info,
-        ngraph::opset3::Subtract::type_info),
+        ngraph::opset3::Subtract::type_info,
+        ngraph::opset3::Maximum::type_info,
+        ngraph::opset3::Minimum::type_info,
+        ngraph::opset3::Less::type_info),
     testing::Values(
         EltwiseParams{DataDims{1000}, DataDims{1}, DynamicToStaticShapeEltwiseSingleDSR::reference_simple},
         EltwiseParams{DataDims{1000, 1, 1}, DataDims{1000, 1, 1}, DynamicToStaticShapeEltwiseSingleDSR::reference_simple},
index 768c3fe..d3090bd 100644 (file)
@@ -94,6 +94,7 @@ INSTANTIATE_TEST_CASE_P(NGraph, DynamicToStaticShapeUnaryElementwise, testing::C
         ngraph::opset3::Relu::type_info,
         ngraph::opset3::Sigmoid::type_info,
         ngraph::opset3::Softmax::type_info,
-        ngraph::opset3::Sqrt::type_info)));
+        ngraph::opset3::Sqrt::type_info,
+        ngraph::opset3::LogicalNot::type_info)));
 
 }  // namespace